aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2014-11-06 12:21:42 +0100
committerodersky <odersky@gmail.com>2014-11-06 12:21:42 +0100
commit8c73426c1db5e867febf9abf565de4201f78d628 (patch)
tree09daa9a769d237293fa9e63a8ddcce56fbea6311 /tests/neg
parent09d5673de8d3a9ddd50c3c221992ede6117e16bf (diff)
parentbec85a90dda4c8488e3bbc47bfd0c64c6c3ed774 (diff)
downloaddotty-8c73426c1db5e867febf9abf565de4201f78d628.tar.gz
dotty-8c73426c1db5e867febf9abf565de4201f78d628.tar.bz2
dotty-8c73426c1db5e867febf9abf565de4201f78d628.zip
Merge pull request #180 from smarter/fix/nosymbol-subtyping
Fix subtyping of types without symbols
Diffstat (limited to 'tests/neg')
-rw-r--r--tests/neg/subtyping.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/neg/subtyping.scala b/tests/neg/subtyping.scala
index d7f849ddc..a4a5a3d19 100644
--- a/tests/neg/subtyping.scala
+++ b/tests/neg/subtyping.scala
@@ -4,10 +4,11 @@ class B {
class A extends B
object Test {
- def foo(a: A#X): Unit = {
- return;
+ def test1(): Unit = {
+ implicitly[B#X <:< A#X]
}
- def test(): Unit = {
- foo(??? : B#X);
+ def test2(): Unit = {
+ val a : { type T; type U } = ???
+ implicitly[a.T <:< a.U]
}
}