diff options
author | Martin Odersky <odersky@gmail.com> | 2016-07-14 18:06:48 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-14 19:52:22 +0200 |
commit | 82fc27f0c2c800de786b54110cfd8627b043fe6d (patch) | |
tree | 92bff1bc2f6869495e46fd77a1220153c25b46ac /tests/neg | |
parent | 18b30803952cee83580eab28068bc773fdce780e (diff) | |
download | dotty-82fc27f0c2c800de786b54110cfd8627b043fe6d.tar.gz dotty-82fc27f0c2c800de786b54110cfd8627b043fe6d.tar.bz2 dotty-82fc27f0c2c800de786b54110cfd8627b043fe6d.zip |
Fix bounds checking of hk applied typed
Previous logic could only handle classes as constructors.
Also, address other reviewers comments.
Diffstat (limited to 'tests/neg')
-rw-r--r-- | tests/neg/t7278.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/neg/t7278.scala b/tests/neg/t7278.scala index 7aafbb76f..643a3c858 100644 --- a/tests/neg/t7278.scala +++ b/tests/neg/t7278.scala @@ -13,8 +13,8 @@ object Test { def fail1(): Unit = { val b = new B - var x1: EE[A] = null - var x2: EE[B] = new b.E // old-error: found: B#E, required: A#E + var x1: EE[A] = null // error: Type argument A does not conform to upper bound EC + var x2: EE[B] = new b.E // error: Type argument B does not conform to upper bound EC // x1 = x2 // gives a prior type error: B#E, required: A#E, masked to get at the real thing. } @@ -27,8 +27,8 @@ object Test { } */ def fail3(): Unit = { - var x1: EE[C] = 5 - var x2: EE[C & D] = "" + var x1: EE[C] = 5 // error: Type argument C does not conform to upper bound EC + var x2: EE[C & D] = "" // error: Type argument C & D does not conform to upper bound EC x1 = x2 } |