-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Specially handle more scenarios for type parameters with 'allows ref struct' constraint #73363
Specially handle more scenarios for type parameters with 'allows ref struct' constraint #73363
Conversation
…struct' constraint
public ref struct S1 : I1<S1> | ||
{ | ||
public int P {get;set;} | ||
public static S1 Create() => default; |
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.
// s2 = (s1 ??= s2); | ||
Diagnostic(ErrorCode.ERR_EscapeVariable, "s1 ??= s2").WithArguments("s1").WithLocation(11, 15) | ||
); | ||
} |
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.
public ref struct S1 : I1<S1> | ||
{ | ||
public int P {get;set;} | ||
public static S1 Create() => default; |
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.
comp, | ||
expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? "123 246" : null, | ||
verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); | ||
} |
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.
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.
Are we testing the corresponding cases for collection expressions?
CollectionExpressions_01
?
@jjonescz, @dotnet/roslyn-compiler For the second review |
7467dda
into
dotnet:features/RefStructInterfaces
No description provided.