We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ace5ac5 commit 3692b22Copy full SHA for 3692b22
tests/neg/struct-given.scala
@@ -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