Skip to content

Commit 6754659

Browse files
committed
Add regression tests for #209
1 parent a90d247 commit 6754659

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
:NewDefs
2+
3+
// * These type definitions should be checked for cyclicity, like we did in the old frontend,
4+
// * but this is currently not implemented.
5+
6+
7+
type Foo = Foo
8+
//│ type Foo = Foo
9+
10+
(f: Foo) => f : Str
11+
//│ (f: Foo) -> Str
12+
//│ res
13+
//│ = [Function: res]
14+
15+
16+
type Foo = Foo & Int
17+
//│ type Foo = Foo & Int
18+
19+
// FIXME
20+
(f: Foo) => f : Str
21+
//│ /!!!\ Uncaught error: java.lang.StackOverflowError
22+
23+
24+
abstract class Foo: Foo
25+
//│ abstract class Foo: Foo
26+
27+
// FIXME
28+
(f: Foo) => f : Str
29+
//│ /!!!\ Uncaught error: java.lang.StackOverflowError
30+
31+
32+
abstract class Foo[T]: Foo[Int]
33+
//│ abstract class Foo[T]: Foo[Int]
34+
35+
// FIXME
36+
fun test(f: Foo['a]) = f : Str
37+
//│ /!!!\ Uncaught error: java.lang.StackOverflowError
38+
39+

0 commit comments

Comments
 (0)