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
The following code does not terminate properly on an MacBook Pro M2 (and M1 too):
// main_test.vfnfoo(i int) !int {
m:= [3, 4, 5]
// This works// r := m[i] or {// return error('bad boy!')// }// this does not workr:= m[i]!return r
}
fntest_foo() {
g:=foo(3) or { 12 }
assertg==12
}
Test the file:
v test main_test.v
See the output:
fn test_foo
> assert g == 12
Left value (len: 7): `5119952` (this is a random value)
Right value (len: 2): `12`
Reproduction Steps
Buy a Macbook Pro or ask a friend who already has one for a favor and run the code above.
Describe the bug
The following code does not terminate properly on an MacBook Pro M2 (and M1 too):
Test the file:
v test main_test.vSee the output:
Reproduction Steps
Buy a Macbook Pro or ask a friend who already has one for a favor and run the code above.
Expected Behavior
It should complain.
Current Behavior
It doesn't complain.
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.10 6be298d
Environment details (OS name and version, etc.)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.