aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/structural.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/structural.scala')
-rw-r--r--tests/pos/structural.scala21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/pos/structural.scala b/tests/pos/structural.scala
new file mode 100644
index 000000000..8afa49ed0
--- /dev/null
+++ b/tests/pos/structural.scala
@@ -0,0 +1,21 @@
+object test123 {
+ type A = { def a: Int }
+ def f(a: A): A = a
+}
+
+object structural2 {
+ type A = { def a: Int }
+
+ type B = {
+ def b: Int
+ }
+
+ type AB = A & B
+
+ def f(ab: AB): AB = ab
+
+ f(new {
+ def a = 43
+ def b = 42
+ })
+} \ No newline at end of file