diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-09-23 15:51:19 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-09-23 15:51:19 +0000 |
commit | d7739fc01492e674a2806e08558a8112a885ee1b (patch) | |
tree | 3b44f5bc7290e4dfe24ef48d2b52b20210c0a6eb /test | |
parent | 43babf744b90aa8d1ca08d58c71e51b48bd6f731 (diff) | |
download | scala-d7739fc01492e674a2806e08558a8112a885ee1b.tar.gz scala-d7739fc01492e674a2806e08558a8112a885ee1b.tar.bz2 scala-d7739fc01492e674a2806e08558a8112a885ee1b.zip |
closes #3857: retain pre-erasure info in type h...
closes #3857: retain pre-erasure info in type history after cloning of
mixed in members and, specifically for this bug, fields, so that java
generic type sigs are more precise.
review by DRagos
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t3857.check | 2 | ||||
-rw-r--r-- | test/files/run/t3857.scala | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t3857.check b/test/files/run/t3857.check new file mode 100644 index 0000000000..11c05783d9 --- /dev/null +++ b/test/files/run/t3857.check @@ -0,0 +1,2 @@ +private java.util.Set<java.lang.String> ScalaGeneric.s +private java.util.Set<java.lang.String> ScalaGeneric2.s
\ No newline at end of file diff --git a/test/files/run/t3857.scala b/test/files/run/t3857.scala new file mode 100644 index 0000000000..9cb44e7fe7 --- /dev/null +++ b/test/files/run/t3857.scala @@ -0,0 +1,12 @@ +class ScalaGeneric { var s: java.util.Set[String] = _ } + +trait ScalaGeneric2Trait { var s: java.util.Set[String] = _ } +class ScalaGeneric2 extends ScalaGeneric2Trait + +object Test extends Application { + println(classOf[ScalaGeneric].getDeclaredField("s").toGenericString) + // java.util.Set<java.lang.String> ScalaGeneric.s + + println(classOf[ScalaGeneric2].getDeclaredField("s").toGenericString) + // java.util.Set ScalaGeneric2.s -- should be same as above +}
\ No newline at end of file |