Skip to content

Commit 3aaf0cd

Browse files
dwijnandsmarter
authored andcommitted
Switch to making baseType consider annotations
1 parent 7115bae commit 3aaf0cd

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2225,8 +2225,13 @@ object SymDenotations {
22252225
case tp @ AppliedType(tycon, args) =>
22262226
def computeApplied = {
22272227
btrCache(tp) = NoPrefix
2228+
extension (tp: Type) def typeSymbol2: Symbol = tp match
2229+
case tp: TypeRef => tp.symbol
2230+
case tp: TypeVar => tp.underlying.typeSymbol2
2231+
case tp: AppliedType => tp.underlying.typeSymbol2
2232+
case _ => NoSymbol
22282233
val baseTp =
2229-
if (tycon.typeSymbol eq symbol) tp
2234+
if (tycon.typeSymbol2 eq symbol) tp
22302235
else (tycon.typeParams: @unchecked) match {
22312236
case LambdaParam(_, _) :: _ =>
22322237
recur(tp.superType)

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2402,7 +2402,7 @@ object Types {
24022402

24032403
private def argDenot(param: TypeSymbol)(using Context): Denotation = {
24042404
val cls = param.owner
2405-
val args = prefix.widenDealias.baseType(cls).argInfos
2405+
val args = prefix.baseType(cls).argInfos
24062406
val typeParams = cls.typeParams
24072407

24082408
def concretize(arg: Type, tparam: TypeSymbol) = arg match {

compiler/test/dotc/pos-test-pickling.blacklist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ i15181.scala
2121
i15922.scala
2222
t5031_2.scala
2323
i16997.scala
24-
argDenot-alpakka.scala
2524

2625
# Tree is huge and blows stack for printing Text
2726
i7034.scala

0 commit comments

Comments
 (0)