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 cbe2ab2 commit 673392bCopy full SHA for 673392b
tests/pos/i1540b.scala
@@ -0,0 +1,14 @@
1
+class Casey1[T](val a: T) {
2
+ def isDefined: Boolean = true
3
+ def isDefined(x: T): Boolean = ???
4
+ def get: T = a
5
+ def get(x: T): String = ???
6
+}
7
+object Casey1 { def unapply[T](a: Casey1[T]) = a }
8
+
9
+object Test {
10
+ def main(args: Array[String]): Unit = {
11
+ val c @ Casey1(x) = new Casey1(0)
12
+ assert(x == c.get)
13
+ }
14
0 commit comments