You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia>struct Good{T}
_::Tend# (no error)
julia>struct Bad{T}
__::Tend
ERROR: syntax: all-underscore identifier used as rvalue
For what it's worth, I like this behavior. I just think the error message should be improved since, 1. it doesn't seem like an rvalue to me (maybe that's my fault, but see below), and 2. you can have an all-underscore field name so long as it's _.
Regarding the term rvalue:
julia>mutable struct GoodM{T}
_::Tend
julia>GoodM(1)
GoodM{Int64}(1)
julia>GoodM(1)._
1
julia>GoodM(1)._ =3# feels like it's an lvalue!3
The text was updated successfully, but these errors were encountered:
For what it's worth, I like this behavior. I just think the error message should be improved since, 1. it doesn't seem like an rvalue to me (maybe that's my fault, but see below), and 2. you can have an all-underscore field name so long as it's
_
.Regarding the term
rvalue
:The text was updated successfully, but these errors were encountered: