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
typedef t = @{0x1=int, 02=int, 3=int, a=int}
static val v: t
val x = v.1
The first line triggers no error, suggesting natural numbers as record member names may be expressed in any base, although the syntax requires the selectors to be expressed with the decimal notation (it’s a special lexical unit).
But I get an error on the third line: “the record-type […] is expected to contain the label [int] but it does not.”
If for the third line I do this instead:
val x = v.0
… then there is no more error. It seems 0x1 is misinterpreted as 0.
The text was updated successfully, but these errors were encountered:
In the syntax guide, I wrote the label must use decimal notation. If this error is there, I believe this means in practice it always uses decimal else someone would have already noticed the issue.
While testing, I tried this:
The first line triggers no error, suggesting natural numbers as record member names may be expressed in any base, although the syntax requires the selectors to be expressed with the decimal notation (it’s a special lexical unit).
But I get an error on the third line: “the record-type […] is expected to contain the label [int] but it does not.”
If for the third line I do this instead:
… then there is no more error. It seems
0x1
is misinterpreted as0
.The text was updated successfully, but these errors were encountered: