-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Area-CompilersFeature - Ref FieldsuntriagedIssues and PRs which have not yet been triaged by a leadIssues and PRs which have not yet been triaged by a lead
Milestone
Description
Version Used: VS 17.3.0 Preview 3.0, .NET 7.0.100-preview.6.22352.1
Steps to Reproduce:
- Paste the following code (sharplab):
struct Foo
{
public ref int Bar;
}- Observe no compile error is produced (a
TypeLoadExceptionis instead thrown at runtime)
Expected Behavior:
This should result in some build error about a non-byref-like type having a byref field.
Actual Behavior:
The code produces no build error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-CompilersFeature - Ref FieldsuntriagedIssues and PRs which have not yet been triaged by a leadIssues and PRs which have not yet been triaged by a lead