21 lines
535 B
Plaintext
21 lines
535 B
Plaintext
|
|
// Minimal SSA Bug Reproduction
|
||
|
|
// Pattern: Conditional reassignment with immediate usage
|
||
|
|
// Expected: SSA violation "use of undefined value"
|
||
|
|
|
||
|
|
static box MinimalSSABug {
|
||
|
|
main(args) {
|
||
|
|
local x = "test"
|
||
|
|
|
||
|
|
// Problem pattern: reassign + immediate use in nested condition
|
||
|
|
if x.length() > 0 {
|
||
|
|
x = x.substring(0, 2) // reassign x
|
||
|
|
if x.length() > 0 && x.substring(0, 1) == "t" { // immediate use
|
||
|
|
x = x.substring(1, 2) // another reassign
|
||
|
|
print(x)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
return 0
|
||
|
|
}
|
||
|
|
}
|