-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C#: Add cs/call-to-object-tostring to the CCR query suite. #18866
base: main
Are you sure you want to change the base?
C#: Add cs/call-to-object-tostring to the CCR query suite. #18866
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more
…he only flag set is Standalone.
5e6e4be
to
562071f
Compare
string y1 = x1.Prop; | ||
|
||
var x2 = new C(); // Has type `var` as this overrides the implicitly typed keyword `var`. | ||
var y2 = x2.Prop; // Unknown type as `x2` har type `var`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: typo in har
vs has
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into the changes! I put the branch in draft mode again, as it is being used for experiments with extractor changes as well.
It turns out that both the roslyn
and mono
repo suffers from "broken" types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So no need to review yet :-D (will re-request a review when all the back and forth stuff has been handled).
return false; | ||
} | ||
// (1) public class { ... } is a broken type and doesn't have a name. | ||
// (2) public class var { ... } is a an allowed type, but it overrides the var keyword for all uses. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: typo in is a an allowed
if (IsBrokenType(Symbol)) | ||
return Kinds.TypeKind.UNKNOWN; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the symbol for C
show up as a broken one in the below?
class C {
int i;
}
class C {
int j;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
The "only" types that are categorised broken are either a type named var
or if there is not any name supplied (syntax error).
We could make it more advanced if needs be. Right now I am just looking in the issues we can see from results to cs/call-to-object-tostring
.
562071f
to
f9f3e99
Compare
No description provided.