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 275cfa8 commit 4b7c7e3Copy full SHA for 4b7c7e3
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -2633,7 +2633,8 @@ object Types {
2633
}
2634
2635
if (prefix.isInstanceOf[WildcardType]) WildcardType
2636
- else withPrefix(prefix)
+ else if prefix.isValueTypeOrWildcard || (prefix eq NoPrefix) then withPrefix(prefix)
2637
+ else typer.ErrorReporting.errorType(i"Cannot ($this).deriveSelect($prefix)", ctx.tree)
2638
2639
2640
/** A reference like this one, but with the given symbol, if it exists */
tests/neg/i12448.scala
@@ -0,0 +1,4 @@
1
+object Main {
2
+ def mkArray[T <: A]: T#AType // error // error
3
+ mkArray[Array] // was: "assertion failed: invalid prefix HKTypeLambda..."
4
+}
0 commit comments