diff options
author | Martin Odersky <odersky@gmail.com> | 2014-04-29 16:05:02 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-05-08 21:51:46 +0200 |
commit | f84a49d4502c9a1ad328c1f5a3a558afade63848 (patch) | |
tree | 1a00336dbb26d2024495eace60574d2c060ee4a9 /tests/neg | |
parent | 79632fb0eeb6adb82739e41cae671d698278aab9 (diff) | |
download | dotty-f84a49d4502c9a1ad328c1f5a3a558afade63848.tar.gz dotty-f84a49d4502c9a1ad328c1f5a3a558afade63848.tar.bz2 dotty-f84a49d4502c9a1ad328c1f5a3a558afade63848.zip |
Fixing tailrec test.
null is not a subtype of a singleton type in Dotty. This slipped by the type checker before.
With the tightened rules in the next commits, it will become illegal.
Diffstat (limited to 'tests/neg')
-rw-r--r-- | tests/neg/tailcall/tailrec-2.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/neg/tailcall/tailrec-2.scala b/tests/neg/tailcall/tailrec-2.scala index d6b8b1355..bc594293d 100644 --- a/tests/neg/tailcall/tailrec-2.scala +++ b/tests/neg/tailcall/tailrec-2.scala @@ -13,7 +13,7 @@ class Bop2[+A](val element: A) extends Super[A] { @annotation.tailrec final def f[B >: A](mem: List[B]): List[B] = (null: Bop2[A]).f(mem) } object Bop3 extends Super[Nothing] { - @annotation.tailrec final def f[B](mem: List[B]): List[B] = (null: Bop3.type).f(mem) + @annotation.tailrec final def f[B](mem: List[B]): List[B] = (???: Bop3.type).f(mem) } class Bop4[+A](val element: A) extends Super[A] { @annotation.tailrec final def f[B >: A](mem: List[B]): List[B] = Other.f[A].f(mem) |