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 350864f commit 1e67d21Copy full SHA for 1e67d21
tests/neg/structural.scala
@@ -10,4 +10,10 @@ object Test3 {
10
11
type A = { def foo(x: Int): Unit; def foo(x: String): Unit } // error: overloaded definition // error: overloaded definition
12
type B = { val foo: Int; def foo: Int } // error: duplicate foo
13
+
14
+ type C = { var foo: Int } // error: refinements cannot have vars
15
16
+ trait Entry { type Key; val key: Key }
17
+ type D = { def foo(e: Entry, k: e.Key): Unit }
18
+ def i(x: D) = x.foo(???) // error: foo has dependent params
19
}
0 commit comments