-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
Labels
Description
We get a panic in the language service when the linter runs on the following code, however the bug is not in the linter, but in the HIR generated by the lowerer.
namespace Parent.Foo {
function Bar() : Unit {}
export Bar;
}
namespace Baz {
export Parent as ParentAlias;
}
namespace Main {
operation Main() : Unit {
Baz.ParentAlias
}
}HIR representation for the above. Note how there's a reference to "Item 3" which does not exist in the HIR.
Package:
entry expression: Expr 18 [0-0] [Type ?]: Call:
Expr 17 [155-159] [Type ?]: Var: Item 5
Expr 16 [159-161] [Type Unit]: Unit
Item 0 [0-69] (Public):
Namespace ([Ident 5 [10-16] "Parent", Ident 6 [17-20] "Foo"]): Item 1
Item 1 [27-51] (Public):
Parent: 0
Callable 0 [27-51] (function):
name: Ident 1 [36-39] "Bar"
input: Pat 2 [39-41] [Type Unit]: Unit
output: Unit
functors: empty set
body: SpecDecl 3 [27-51]: Impl:
Block 4 [49-51]: <empty>
adj: <none>
ctl: <none>
ctl-adj: <none>
Item 2 [71-122] (Public):
Namespace (Ident 7 [81-84] "Baz"): <empty>
Item 4 [124-202] (Public):
Namespace (Ident 15 [134-138] "Main"): Item 5
Item 5 [145-200] (Internal):
Parent: 4
Callable 8 [145-200] (operation):
name: Ident 9 [155-159] "Main"
input: Pat 10 [159-161] [Type Unit]: Unit
output: Unit
functors: empty set
body: SpecDecl 11 [145-200]: Impl:
Block 12 [169-200] [Type ?]:
Stmt 13 [179-194]: Expr: Expr 14 [179-194] [Type ?]: Var: Item 3
adj: <none>
ctl: <none>
ctl-adj: <none>