diff options
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/sd268.scala | 17 | ||||
-rw-r--r-- | test/files/pos/t10009.scala | 6 |
2 files changed, 23 insertions, 0 deletions
diff --git a/test/files/pos/sd268.scala b/test/files/pos/sd268.scala new file mode 100644 index 0000000000..8839651501 --- /dev/null +++ b/test/files/pos/sd268.scala @@ -0,0 +1,17 @@ +class Context(val v : AnyRef) + +trait AbidePlugin { + val someVal = "" + + val x = null.asInstanceOf[Context { val v : someVal.type }] // CRASH + lazy val y = null.asInstanceOf[Context { val v : someVal.type }] // CRASH + var z = null.asInstanceOf[Context { val v : someVal.type }] // CRASH +} + +class C { + val someVal = "" + + val x = null.asInstanceOf[Context { val v : someVal.type }] + lazy val y = null.asInstanceOf[Context { val v : someVal.type }] // CRASH + var z = null.asInstanceOf[Context { val v : someVal.type }] +} diff --git a/test/files/pos/t10009.scala b/test/files/pos/t10009.scala new file mode 100644 index 0000000000..7cd96f0f3d --- /dev/null +++ b/test/files/pos/t10009.scala @@ -0,0 +1,6 @@ +class C { + def c(a: Any, b: Any*) = a +} +object Test { + new C().c(b = new { val x = 42 }, a = 0) +} |