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
In the following example the first arm of the if expression doesn't translate:
fn f() -> ! { fail }
fn g() -> int {
auto x = if (true) {
f()
} else {
10
};
ret x;
}
Trans thinks that f() returns int (because x is int) and tries to copy the result of f, which is not int. Replacing f() with a plain fail expression works as expected.