diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-04-09 16:53:21 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-04-09 16:53:21 -0700 |
commit | 3ce8417b9ab00963c3da342d03a45ed492d6b69b (patch) | |
tree | 8d681bc9208314d53e63e230fa2aafeb869ae3da /test/files | |
parent | 68e05701cd9ef633f7a22b82794c81f67d45be16 (diff) | |
parent | e9bfa33c1eef822eb9d3d0f471f4bbbe390e1e65 (diff) | |
download | scala-3ce8417b9ab00963c3da342d03a45ed492d6b69b.tar.gz scala-3ce8417b9ab00963c3da342d03a45ed492d6b69b.tar.bz2 scala-3ce8417b9ab00963c3da342d03a45ed492d6b69b.zip |
Merge pull request #4403 from gourlaysama/wip/t9239-generic-signature
SI-9239 fix java generic signature when traits extend classes
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/pos/t9239/Declaration.scala | 3 | ||||
-rw-r--r-- | test/files/pos/t9239/Usage.java | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/test/files/pos/t9239/Declaration.scala b/test/files/pos/t9239/Declaration.scala new file mode 100644 index 0000000000..452dcc1e77 --- /dev/null +++ b/test/files/pos/t9239/Declaration.scala @@ -0,0 +1,3 @@ +class Foo[A] +trait Bar[A] extends Foo[A] +class Baz[A] extends Bar[A] diff --git a/test/files/pos/t9239/Usage.java b/test/files/pos/t9239/Usage.java new file mode 100644 index 0000000000..d1e3fb0c3e --- /dev/null +++ b/test/files/pos/t9239/Usage.java @@ -0,0 +1,15 @@ +/** + * Used to fail with: + * + * Usage.java:5: error: incompatible types: Baz<String> cannot be converted to Foo<String> + * foo(f); + * ^ + */ +public class Usage { + public Usage() { + Baz<String> f = null; + foo(f); + } + + public void foo(Foo<String> f) { }; +} |