Skip to content

Commit 2247c7b

Browse files
committed
Switch to making baseType consider annotations
1 parent d203ca9 commit 2247c7b

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
@@ -2222,8 +2222,13 @@ object SymDenotations {
22222222
case tp @ AppliedType(tycon, args) =>
22232223
def computeApplied = {
22242224
btrCache(tp) = NoPrefix
2225+
extension (tp: Type) def typeSymbol2: Symbol = tp match
2226+
case tp: TypeRef => tp.symbol
2227+
case tp: TypeVar => tp.underlying.typeSymbol2
2228+
case tp: AppliedType => tp.underlying.typeSymbol2
2229+
case _ => NoSymbol
22252230
val baseTp =
2226-
if (tycon.typeSymbol eq symbol) tp
2231+
if (tycon.typeSymbol2 eq symbol) tp
22272232
else (tycon.typeParams: @unchecked) match {
22282233
case LambdaParam(_, _) :: _ =>
22292234
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)