diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/bug4221.check | 6 | ||||
-rw-r--r-- | test/files/neg/bug4221.scala | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/files/neg/bug4221.check b/test/files/neg/bug4221.check new file mode 100644 index 0000000000..471332e3c1 --- /dev/null +++ b/test/files/neg/bug4221.check @@ -0,0 +1,6 @@ +bug4221.scala:8: error: type mismatch; + found : Unit + required: Wrapper[S] + def wrap[S <: Cl#Sub[S]](v: S): Wrapper[S] = { + ^ +one error found diff --git a/test/files/neg/bug4221.scala b/test/files/neg/bug4221.scala new file mode 100644 index 0000000000..0a8b8add18 --- /dev/null +++ b/test/files/neg/bug4221.scala @@ -0,0 +1,10 @@ +class Cl { + class Sub[TheSub <: Sub[TheSub]] +} + +case class Wrapper[T](v: T) + +object O { + def wrap[S <: Cl#Sub[S]](v: S): Wrapper[S] = { + } +} |