aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/i50-volatile.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/neg/i50-volatile.scala')
-rw-r--r--tests/neg/i50-volatile.scala25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/neg/i50-volatile.scala b/tests/neg/i50-volatile.scala
new file mode 100644
index 000000000..ae31a764c
--- /dev/null
+++ b/tests/neg/i50-volatile.scala
@@ -0,0 +1,25 @@
+object Test {
+ class Base {
+ class Inner
+ }
+ type A <: Base {
+ type X = String
+ }
+ type B <: {
+ type X = Int
+ }
+ lazy val o: A & B = ???
+
+ class Client extends o.Inner
+
+ def xToString(x: o.X): String = x
+
+ def intToString(i: Int): String = xToString(i)
+}
+object Test2 {
+
+ import Test.o._
+
+ def xToString(x: X): String = x
+
+}