aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/sammy_single.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/sammy_single.scala')
-rw-r--r--tests/untried/pos/sammy_single.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/untried/pos/sammy_single.scala b/tests/untried/pos/sammy_single.scala
new file mode 100644
index 000000000..c64e9c2b0
--- /dev/null
+++ b/tests/untried/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)
+}