buzz-language / buzz

👨‍🚀 buzz, A small/lightweight statically typed scripting language
https://buzz-lang.dev
MIT License
1.15k stars 31 forks source link

Bad type checking in list of anonymous objects #224

Closed giann closed 8 months ago

giann commented 8 months ago
var list = [<obj{ str key, int value }>];

list.append(.{ key = "hello", value = 42});
REPL:1:14: [E8] Compile error: Bad argument type: got type `.{ str key, int value }`, expected `obj{ str key, int value }`
     1 ╭─ values.append(.{key = "hello", value = 42});
       ┆  ╭─────       ┬─
       ┆  ╰─ expected `obj{ str key, int value }`
       ┆               ╰─ Bad argument type: got type `.{ str key, int value }`