summaryrefslogtreecommitdiff
path: root/test/files/pos/nullary_poly.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/nullary_poly.scala')
-rw-r--r--test/files/pos/nullary_poly.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/pos/nullary_poly.scala b/test/files/pos/nullary_poly.scala
new file mode 100644
index 0000000000..9e3f239b36
--- /dev/null
+++ b/test/files/pos/nullary_poly.scala
@@ -0,0 +1,10 @@
+// test polymorphic nullary method calls
+class A {
+ // built-in
+ synchronized {}
+
+ val x: String = "a".asInstanceOf[String]
+
+ // user-defined:
+ def polyNullary[T]: List[T] = Nil
+} \ No newline at end of file