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

Clarify the compiler's policy towards well-known types/members #75522

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/compilers/CSharp/Deviations from Standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,10 @@ interface I1 { void M() { } }
interface I2 { int M => 0; }
interface I : I1, I2 { }
```

# Assumptions about well-known types/members

The compiler is free to make assumptions about the shape and behavior of well-known types/members.
It may not check for unexpected constraints, `Obsolete` attribute, or `UnmanagedCallersOnly` attribute.
It may perform some optimizations based on expectations that the types/members are well-behaved.
Note: the compiler should remain resilient to missing well-known types/members.