-
Notifications
You must be signed in to change notification settings - Fork 786
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
ByRefLike structs can be declared in Anonymous Record types #6104
Comments
cartermp
changed the title
ByRefLike-values can be declared in Anonymous Record types
ByRefLike structscan be declared in Anonymous Record types
Jan 15, 2019
cartermp
changed the title
ByRefLike structscan be declared in Anonymous Record types
ByRefLike structs can be declared in Anonymous Record types
Jan 15, 2019
This was referenced Jan 17, 2019
Or could it be auto promoted to byreflike in this case ? |
Not in this case, no. This isn't a struct anonymous record declaration. |
True, but would it be promoted if it was:
?? |
In this case it could be, yes. |
This has been fixed somewhere along the way |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following compiles:
It should not compile, because
r
is reference type, thus violating the rules ofByRefLike
structs.Given that we cannot declare a ByRefLike struct anonymous record, ByReflike types such as
Span
should not be allowed inside of an anonymous record at all.The text was updated successfully, but these errors were encountered: