aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/enum-interop.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/enum-interop.scala')
-rw-r--r--tests/pos/enum-interop.scala13
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), "")
+
+
+
+
+}