diff options
Diffstat (limited to 'src/dotty/tools/dotc')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index c0e4ccb14..f7308c1f1 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -2104,7 +2104,8 @@ object Types { tp.derivedOrType(this(tp.tp1), this(tp.tp2)) case tp @ AnnotatedType(annot, underlying) => - tp.derivedAnnotatedType(mapOver(annot), this(underlying)) + val underlying1 = mapOver(underlying) + if (underlying1 eq underlying) tp else underlying1 case tp @ WildcardType => tp.derivedWildcardType(mapOver(tp.optBounds)) |