mirror of
https://github.com/github/codeql.git
synced 2026-04-19 14:04:09 +02:00
Merge pull request #1361 from calumgrant/cs/roslyn-3.1
C#: Update to Roslyn 3.1
This commit is contained in:
@@ -139,16 +139,9 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
|
||||
if (nt.TypeKind == TypeKind.Struct)
|
||||
{
|
||||
// Sadly, these properties are internal so cannot be accessed directly.
|
||||
// This seems to be a deficiency in the model.
|
||||
var readonlyProperty = nt.GetType().GetProperty("IsReadOnly", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
bool isReadOnly = (bool)readonlyProperty.GetValue(nt);
|
||||
bool isByRefLikeType = nt.IsRefLikeType;
|
||||
|
||||
if (isReadOnly)
|
||||
if (nt.IsReadOnly)
|
||||
HasModifier(cx, key, "readonly");
|
||||
if (isByRefLikeType)
|
||||
if (nt.IsRefLikeType)
|
||||
HasModifier(cx, key, "ref");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.1.0" />
|
||||
<PackageReference Include="GitInfo" Version="2.0.18" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user