Skip to content

Unsafe evolution: check lang version for caller-unsafe declarations#81698

Merged
jjonescz merged 4 commits into
dotnet:features/UnsafeEvolutionfrom
jjonescz:Unsafe-05-MembersLangVersion
Dec 19, 2025
Merged

Unsafe evolution: check lang version for caller-unsafe declarations#81698
jjonescz merged 4 commits into
dotnet:features/UnsafeEvolutionfrom
jjonescz:Unsafe-05-MembersLangVersion

Conversation

@jjonescz

@jjonescz jjonescz commented Dec 15, 2025

Copy link
Copy Markdown
Member

Test plan: #81207

Follow up on #81581 (i.e., still only for methods and properties).

  1. Checking lang version.
  2. Improving some tests.

@jjonescz jjonescz marked this pull request as ready for review December 15, 2025 15:36
@jjonescz jjonescz requested a review from a team as a code owner December 15, 2025 15:36
@jjonescz jjonescz requested review from 333fred and jcouv December 15, 2025 15:36
})
.VerifyDiagnostics();

CompileAndVerify(source,

@333fred 333fred Dec 15, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please use an explicit langversion option here for clarity. #Closed

@jcouv jcouv self-assigned this Dec 16, 2025
@jjonescz jjonescz requested a review from 333fred December 16, 2025 12:27
@jjonescz

Copy link
Copy Markdown
Member Author

@jcouv for a second review, thanks

@jjonescz

Copy link
Copy Markdown
Member Author

@AlekseyTs for a second review if you are available, thanks

return members;
}

public static ImmutableArray<Symbol> GetMembersByQualifiedName(this NamespaceOrTypeSymbol container, string qualifiedName)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: consider making this GetMembersByQualifiedName<T> like GetMembers<T> above. Then the caller doesn't need OfType<MethodSymbol> (unless there were multiple member kinds involved)

@jcouv jcouv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM Thanks (commit 3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants