We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c12f2ea commit 31b3d83Copy full SHA for 31b3d83
src/dotty/tools/dotc/core/TypeComparer.scala
@@ -460,7 +460,7 @@ class TypeComparer(initctx: Context) extends DotClass {
460
tp1 match {
461
case tp1: NamedType =>
462
val sym1 = tp1.symbol
463
- (if (sym1 eq tp2.symbol) (
+ (if ((sym1 ne NoSymbol) && (sym1 eq tp2.symbol)) (
464
ctx.erasedTypes
465
|| sym1.isStaticOwner
466
|| { // Implements: A # X <: B # X
tests/neg/subtyping.scala
@@ -4,7 +4,11 @@ class B {
4
class A extends B
5
6
object Test {
7
- def test(): Unit = {
+ def test1(): Unit = {
8
implicitly[B#X <:< A#X]
9
}
10
+ def test2(): Unit = {
11
+ val a : { type T; type U } = ???
12
+ implicitly[a.T <:< a.U]
13
+ }
14
0 commit comments