winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.76k stars 187 forks source link

Compiler panic when calling namespaced function within index expression #6661

Open MarkMcCulloh opened 3 weeks ago

MarkMcCulloh commented 3 weeks ago

I tried this:

bring math;
let s = [1];
s[math.round(0)];

This happened:

Compiler bug during type-checking ('panicked at libs/wingc/src/type_check_assert.rs:34:13:
Expr was not type checked: Expr { id: 3, kind: Reference(Identifier(Symbol { name: "math", span: WingSpan { start: WingLocation { line: 2, col: 2 }, end: WingLocation { line: 2, col: 6 }, file_id: "...", start_offset: 27, end_offset: 31 } })), span: WingSpan { start: WingLocation { line: 2, col: 2 }, end: WingLocation { line: 2, col: 6 }, file_id: "...", start_offset: 27, end_offset: 31 } }')

I expected this:

No response

Is there a workaround?

No response

Anything else?

No response

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Community Notes