summaryrefslogtreecommitdiffhomepage
path: root/CompilerDriver/cc2/regression-tests/pure2-bugfix-for-unbraced-function-expression.cpp2
blob: 6fb1d13a198f28f137d7881da19d899ed2a58307 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
t: type = {
  operator[]: (this, _) = { }
}

main: () -> int = {
  (x := t()) { x[:() -> _ = 0]; }
  (x := t()) { x[:() -> _ = 0;]; }

  assert(!(:() 0; is int));

  return :i32 = 0;
}

x :== :i32 = 0;
y: i32     = 0;