summaryrefslogtreecommitdiff
path: root/test/files/pos/sammy_single.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/sammy_single.scala')
-rw-r--r--test/files/pos/sammy_single.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/pos/sammy_single.scala b/test/files/pos/sammy_single.scala
new file mode 100644
index 0000000000..7a3d272983
--- /dev/null
+++ b/test/files/pos/sammy_single.scala
@@ -0,0 +1,9 @@
+// test that dependent types work
+// TODO: def apply(x: String): x.type does NOT work yet
+object Test {
+ val s: String = ""
+
+ trait T { def apply(x: s.type): s.type }
+
+ val preservedResult: s.type = ((x => x): T)(s)
+} \ No newline at end of file