C#: upgrade Roslyn dependencies to version 3.7#4041
Merged
tamasvajk merged 8 commits intogithub:mainfrom Sep 14, 2020
Merged
Conversation
5e5224b to
fa3e038
Compare
Contributor
Author
|
I think this is expected to fail, because the tests can't build a new codeql CLI without the new dependencies. |
tamasvajk
commented
Sep 4, 2020
| case TypeKind.Error: | ||
| var named = (INamedTypeSymbol)type; | ||
| if (named.IsTupleType) | ||
| if (named.IsTupleType && named.TupleUnderlyingType is object) |
Contributor
Author
There was a problem hiding this comment.
Tuple<T1,T2,T3,T4,T5,T6,T7,TRest> and similar are IsTupleType == true, but TupleUnderlyingType == null
|
|
||
| var underlyingType = NamedType.Create(Context, symbol.TupleUnderlyingType); | ||
| trapFile.tuple_underlying_type(this, underlyingType); | ||
| if (symbol.TupleUnderlyingType is object) |
Contributor
Author
There was a problem hiding this comment.
this might be null see, below.
| trapFile.tuple_underlying_type(this, underlyingType); | ||
| if (symbol.TupleUnderlyingType is object) | ||
| { | ||
| var underlyingType = TupleType.Create(Context, symbol.TupleUnderlyingType); |
Contributor
Author
There was a problem hiding this comment.
TupleUnderlyingType is not a NamedType, but a TupleType.
Contributor
Author
|
With these changes the extracted data changed too. I found the following in the print ast expected files. @hvitved Didn't you fix something similar during the assembly prefix PR? |
7d2bde8 to
092c0a0
Compare
The documentation on `ExplicitInterfaceImplementations` says "Properties imported from metadata can explicitly implement more than one property", so the constraint appears to be invalid.
092c0a0 to
de7f850
Compare
tamasvajk
commented
Sep 10, 2020
|
|
||
| explicitly_implements( | ||
| unique int id: @member ref, | ||
| int id: @member ref, |
Contributor
Author
There was a problem hiding this comment.
I'm not sure I understand the case covered by the quoted comment. Is it the following:
using System;
interface IA
{
int Prop
{
get;
}
}
interface IB : IA
{
}
class C : IB
{
int IA.Prop // Does this property explicitly implement both IA and IB?
{
get
{
return 1;
}
}
public int Prop
{
get
{
return 2;
}
}
}
public class Program
{
public static void Main()
{
var c = new C();
Console.WriteLine(c.Prop); // 2
Console.WriteLine(((IA)c).Prop); // 1
Console.WriteLine(((IB)c).Prop); // 1
}
}
tamasvajk
commented
Sep 10, 2020
csharp/extractor/Semmle.Extraction.CSharp.Standalone/Runtime.cs
Outdated
Show resolved
Hide resolved
de7f850 to
6c5b30d
Compare
tamasvajk
commented
Sep 14, 2020
hvitved
approved these changes
Sep 14, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.