Open mratsim opened 5 years ago
This is not a problem per se but it's undocumented, is that something we can rely on or an implementation leak?
You can rely on it. (Though we need to ensure it keeps working with a test and document it.)
Interesting bug I noticed: if you pass value
to a procedure like for example proc foo(x: var int64)
(under the is int
branch) then you'll get this error:
Error: for a 'var' type a variable needs to be passed; but 'int64(o.field1)' is immutable
Guessing this is because the compiler does a rewrite (note that the above is from my code which uses different field/obj names).
The fields "yielded" by
fields
andfieldPairs
are mutable if the object is mutable.This is not a problem per se but it's undocumented, is that something we can rely on or an implementation leak?
Note: the description mentions
The current implementation also has a bug that affects symbol binding in the loop body.
without going into more details.Test case: