File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2727,7 +2727,7 @@ object Types {
2727
2727
2728
2728
case tp @ AnnotatedType (annot, underlying) =>
2729
2729
val underlying1 = this (underlying)
2730
- if (underlying1 eq underlying) tp else underlying1
2730
+ if (underlying1 eq underlying) tp else tp.derivedAnnotatedType(mapOver(annot), underlying1)
2731
2731
2732
2732
case tp @ WildcardType =>
2733
2733
tp.derivedWildcardType(mapOver(tp.optBounds))
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ trait Inferencing { this: Checking =>
99
99
/** Recursively widen and also follow type declarations and type aliases. */
100
100
def widenForMatchSelector (tp : Type )(implicit ctx : Context ): Type = tp.widen match {
101
101
case tp : TypeRef if ! tp.symbol.isClass => widenForMatchSelector(tp.info.bounds.hi)
102
+ case tp : AnnotatedType => tp.derivedAnnotatedType(tp.annot, widenForMatchSelector(tp.tpe))
102
103
case tp => tp
103
104
}
104
105
You can’t perform that action at this time.
0 commit comments