akhismat / test-huly

0 stars 0 forks source link

GitHub POST: bulleted todos #259

Open akhismat opened 1 day ago

akhismat commented 1 day ago

Describe the bug

RUNTIME ERROR: invalid memory access

Reproduction Steps

fn main() {
    m := { "1":"1", "2":"2" }
    if b := m["1"] {.
        defer { println(b)}
        println("ok")
    }
}

Result:

ufm@ufmpc:~/src/vtest$ ./vt
ok

ufm@ufmpc:~/src/vtest$ ./vt
ok

ufm@ufmpc:~/src/vtest$ ./vt
ok

ufm@ufmpc:~/src/vtest$ ./vt
ok

ufm@ufmpc:~/src/vtest$ ./vt
ok
0x774c4afa07cd: at ???: RUNTIME ERROR: invalid memory access
0x01f69500: by ???
Segmentation fault (core dumped)

Expected Behavior

Get the value of "b" or get a compiler error saying that this is not allowed.

Current Behavior

0x7178a25a07cd: at ???: RUNTIME ERROR: invalid memory access 0x02892500: by ??? Segmentation fault (core dumped)

Possible Solution

No response

Additional Information/Context

No response

V version

0.4.8 e1b842a

Environment details (OS name and version, etc.)

Linux

[!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.

Huly®: INTEG-249