summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/infersingle.flags1
-rw-r--r--test/files/pos/infersingle.scala5
2 files changed, 6 insertions, 0 deletions
diff --git a/test/files/pos/infersingle.flags b/test/files/pos/infersingle.flags
new file mode 100644
index 0000000000..e1b37447c9
--- /dev/null
+++ b/test/files/pos/infersingle.flags
@@ -0,0 +1 @@
+-Xexperimental \ No newline at end of file
diff --git a/test/files/pos/infersingle.scala b/test/files/pos/infersingle.scala
new file mode 100644
index 0000000000..6830fcd799
--- /dev/null
+++ b/test/files/pos/infersingle.scala
@@ -0,0 +1,5 @@
+object Test {
+ def one[T](x: T): Option[T] = Some(x)
+ val x = "one"
+ val y: Option[x.type] = one(x)
+} \ No newline at end of file