aboutsummaryrefslogtreecommitdiff
path: root/tests/run/classtags_contextbound.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/classtags_contextbound.scala')
-rw-r--r--tests/run/classtags_contextbound.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/run/classtags_contextbound.scala b/tests/run/classtags_contextbound.scala
new file mode 100644
index 000000000..1edce82a2
--- /dev/null
+++ b/tests/run/classtags_contextbound.scala
@@ -0,0 +1,7 @@
+import scala.reflect.{ClassTag, classTag}
+
+object Test extends dotty.runtime.LegacyApp {
+ def mkArray[T: ClassTag] = Array[T]()
+ def foo[T: ClassTag] = mkArray[T]
+ println(foo[Int].getClass)
+}