Skip to content
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

VBOverloadResolutionPriority: break attribute binding cycles, clone a bunch of C# tests #76008

Conversation

AlekseyTs
Copy link
Contributor

No description provided.

@AlekseyTs AlekseyTs requested a review from a team as a code owner November 21, 2024 15:29
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Nov 21, 2024
@AlekseyTs
Copy link
Contributor Author

@cston, @333fred, @dotnet/roslyn-compiler Please review

@AlekseyTs
Copy link
Contributor Author

@cston, @dotnet/roslyn-compiler For the second review

1 similar comment
@AlekseyTs
Copy link
Contributor Author

@cston, @dotnet/roslyn-compiler For the second review

throw DirectCast(Nothing, System.Exception)
End Sub
"

Copy link
Member

@cston cston Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like these are not used. #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like these are not used.

Looks this way. Will remove.


Dim compilation = CreateCompilation({source, OverloadResolutionPriorityAttributeDefinitionVB}, options:=TestOptions.DebugExe)

' Note, VB silently ignores attributes at wrong location
Copy link
Member

@cston cston Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, VB silently ignores attributes at wrong location

Do we need a test for C# consuming such cases? #Closed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there is such a test already: Overrides_ChangePriorityInMetadata_Methods.

"

Dim compilation = CreateCompilation(source, options:=TestOptions.DebugExe)
compilation.AssertTheseEmitDiagnostics(
Copy link
Member

@cston cston Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compilation.AssertTheseEmitDiagnostics

The equivalent C# test avoids verifying diagnostics, presumably to increase the chance of a cycle in attribute binding when using the semantic model. Is that not useful here? #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that not useful here?

It is done below. The compilation is recreated after we check diagnostics

@AlekseyTs AlekseyTs enabled auto-merge (squash) November 23, 2024 19:30
@AlekseyTs AlekseyTs merged commit 9e8ad61 into dotnet:features/VBOverloadResolutionPriority Nov 23, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Feature - Overload Resolution Priority untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants