V version: V 0.4.9 496451e , press to see full `v doctor` output
V full version
V 0.4.9 4fcd94a .496451e
OS
windows, Њ ©Єа®б®дв Windows 10 Pro 19045 64-а §ап¤ п
Processor
28 cpus, 64bit, little endian, Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
Memory
18.78GB/31.86GB
V executable
C:\Dev\Progs\v\v.exe
V last modified time
2025-01-17 20:10:01
V home dir
OK, value: C:\Dev\Progs\v
VMODULES
OK, value: C:\Users\koplenov.vmodules
VTMP
OK, value: C:\Users\koplenov\AppData\Local\Temp\v_0
Current working dir
OK, value: C:\Dev\Zone\mam_v\treevee\src\repro
Git version
git version 2.42.0.windows.2
V git status
weekly.2025.1-72-g496451ec (12 commit(s) behind V master)
.git/config present
true
cc version
N/A
gcc version
gcc (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders, r4) 13.2.0
clang version
clang version 18.1.2
msvc version
N/A
tcc version
tcc version 0.9.27 (x86_64 Windows)
tcc git status
thirdparty-windows-amd64 b425ac82
emcc version
N/A
glibc version
N/A
What did you do?
./v -g -o vdbg cmd/v && ./vdbg .\main.v && C:\Dev\Zone\mam_v\treevee\src\repro\main.exe
module main
pub struct Tree {
value string
}
pub type TreeBelt = map [string ]fn (input string ) []string
fn main () {
tree := Tree{
value: 'he he'
}
mut belt := TreeBelt (map [string ]fn (string ) []string ){
"bar" : fn [tree](input string ) []string {
return [tree.value + input]
}
}
mut belt2 := TreeBelt (map [string ]fn (string ) []string ){}
belt2 ['bar' ] = fn [tree](input string ) []string {
return [tree.value + input]
}
// ok
println (belt["bar" ]) // fn (string) []string
println (belt2 ["bar" ]) // fn (string) []string
println (belt["bar" ]("foo" )) // throw Unhandled Exception 0x149f6f0
println (belt2 ["bar" ]("fo" )) // ok
}
What did you see?
fn (string) []string
fn (string) []string
Unhandled Exception 0x149f6f0
C:/Users/koplenov/AppData/Local/Temp/v_0/main.01JHZ9T7ZR1QFSFA4GXGBZQ1Q5.tmp.c:4464: at print_backtrace_skipping_top_frames_tcc: Backtrace
C:/Users/koplenov/AppData/Local/Temp/v_0/main.01JHZ9T7ZR1QFSFA4GXGBZQ1Q5.tmp.c:4450: by print_backtrace_skipping_top_frames
C:/Users/koplenov/AppData/Local/Temp/v_0/main.01JHZ9T7ZR1QFSFA4GXGBZQ1Q5.tmp.c:5056: by unhandled_exception_handler
7ffff6d88b1c : by ???
RUNTIME ERROR: invalid memory access
What did you expect to see?
Execution without Unhandled Exception error
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.
V version: V 0.4.9 496451e, press to see full `v doctor` output
What did you do?
./v -g -o vdbg cmd/v && ./vdbg .\main.v && C:\Dev\Zone\mam_v\treevee\src\repro\main.exeWhat did you see?
What did you expect to see?
Execution without Unhandled Exception error
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.