diff options
Diffstat (limited to 'test/files/pos/t8862b.scala')
-rw-r--r-- | test/files/pos/t8862b.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/pos/t8862b.scala b/test/files/pos/t8862b.scala new file mode 100644 index 0000000000..8be7fb5fab --- /dev/null +++ b/test/files/pos/t8862b.scala @@ -0,0 +1,12 @@ +package p { + trait T[X] { def O : { def apply(): X } } + object `package` extends T[Int] { + def O: { def apply(): Int } = new { def apply(): Int = 42 } + } + + object Test { + def main(args: Array[String]): Unit = { + val x: Int = O() + } + } +} |