diff options
author | Martin Odersky <odersky@gmail.com> | 2014-07-14 13:17:34 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-07-17 11:02:03 +0200 |
commit | ace968dabf8e02f725f7b77cde90f64988a7b326 (patch) | |
tree | 10b4bd92cf02a5a391296f32a51ce3d5ff0d3164 /tests/pos/enum-interop.scala | |
parent | 57d69f8f4d00bef8cbb51d498b5139ca649a8ca6 (diff) | |
download | dotty-ace968dabf8e02f725f7b77cde90f64988a7b326.tar.gz dotty-ace968dabf8e02f725f7b77cde90f64988a7b326.tar.bz2 dotty-ace968dabf8e02f725f7b77cde90f64988a7b326.zip |
Fix to rewire types
t6574 has a new test where we produce identical code in an if-then-else. This broke
the rewiring logic before, and is fixed now.
Also, more comments and test cases.
Diffstat (limited to 'tests/pos/enum-interop.scala')
-rw-r--r-- | tests/pos/enum-interop.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/pos/enum-interop.scala b/tests/pos/enum-interop.scala new file mode 100644 index 000000000..0c9aca79b --- /dev/null +++ b/tests/pos/enum-interop.scala @@ -0,0 +1,13 @@ + + +object Test { + + val cls: java.lang.Class[_] = ??? + + def myAsInstanceOf[T <: Class[T]](cls: java.lang.Class[_]): Class[T] = cls.asInstanceOf[Class[T]] + Enum.valueOf(myAsInstanceOf(cls), "") + + + + +} |