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
datatype X = X(x: int)
method bar(x: int, linear a: X)
method foo(linear a: X)
{
bar(a.x, a);
}
Right now we have to do this instead:
datatype X = X(x: int)
method bar(x: int, linear a: X)
method foo(linear a: X)
{
var x := a.x;
bar(x, a);
}
Note that fixing this requires being cognizant of evaluation order, for example, if we do bar(some_linear_function(a), a.x) then either: (i) this should be disallowed or (ii) the compiler must make sure a.x is evaluated before some_linear_function(a).
The text was updated successfully, but these errors were encountered:
It would be nice to be able to do this:
Right now we have to do this instead:
Note that fixing this requires being cognizant of evaluation order, for example, if we do
bar(some_linear_function(a), a.x)
then either: (i) this should be disallowed or (ii) the compiler must make sure a.x is evaluated beforesome_linear_function(a)
.The text was updated successfully, but these errors were encountered: