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
Type aliasing doesn't seem to work for tuple struct types.
Consider the example below. When building this code without the last line of main(), the compiler gives no errors (as expected). However, when also instantiating a PointTupleAlias (last line of main()), an error: cannot find value `PointTupleAlias` in this scope is produced (full error underneath the example). Expected behavior would be to compile without errors.
Example:
structPointTuple(i32,i32);structPointRecord{x:i32,y:i32}typePointTupleAlias = PointTuple;typePointRecordAlias = PointRecord;pubfnmain(){let pr = PointRecord{x:2,y:3};let pt = PointTuple(2,3);let pr2 = PointRecordAlias{x:2,y:3};let pt2 = PointTupleAlias(2,3);// error: cannot find value `PointTupleAlias` in this scope}
Compile error:
error: cannot find value `PointTupleAlias` in this scope
--> mod.mun:11:15
|
11 | let pt2 = PointTupleAlias(2, 3);
| ^^^^^^^^^^^^^^^ not found in this scope
|
Edit: tested using both Mun 0.3.0 and the main branch
The text was updated successfully, but these errors were encountered:
Wodann
added
type: fix
Bug fix or report
exp: high
Achievable by investing significant time and effort, potentially through collaboration
labels
Jan 2, 2023
Type aliasing doesn't seem to work for tuple struct types.
Consider the example below. When building this code without the last line of
main()
, the compiler gives no errors (as expected). However, when also instantiating aPointTupleAlias
(last line ofmain()
), anerror: cannot find value `PointTupleAlias` in this scope
is produced (full error underneath the example). Expected behavior would be to compile without errors.Example:
Compile error:
Edit: tested using both Mun 0.3.0 and the
main
branchThe text was updated successfully, but these errors were encountered: