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
func foo(x: Int) {
var z: Int
while (x > 0) {
z = 5
if (x == 1)
z = z+1
x = x - 1
}
}
While this is okay
func foo(x: Int) {
var z = 0
while (x > 0) {
z = 5
if (x == 1)
z = z+1
x = x - 1
}
}
The problem seems to be in 2nd block of search() where we look for instructions of form v = x op y. The declaration alone does not generate such an instruction.
Potential solution may be that declaration of a var generates a var instruction that defines the var.
The text was updated successfully, but these errors were encountered:
This snippet fails:
While this is okay
The problem seems to be in 2nd block of search() where we look for instructions of form
v = x op y
. The declaration alone does not generate such an instruction.Potential solution may be that declaration of a var generates a var instruction that defines the var.
The text was updated successfully, but these errors were encountered: