Skip to content

Commit 81bf038

Browse files
committed
New test
1 parent c0aab06 commit 81bf038

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/neg/struct-given.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class C
2+
given c as C with
3+
def foo = 1
4+
5+
given d as C = new C { def foo = 1 }
6+
7+
def test =
8+
c.foo // OK
9+
d.foo // error
10+

0 commit comments

Comments
 (0)