aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/FirstTransform.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/transform/FirstTransform.scala')
-rw-r--r--src/dotty/tools/dotc/transform/FirstTransform.scala7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/transform/FirstTransform.scala b/src/dotty/tools/dotc/transform/FirstTransform.scala
index a58e8a643..42ace148a 100644
--- a/src/dotty/tools/dotc/transform/FirstTransform.scala
+++ b/src/dotty/tools/dotc/transform/FirstTransform.scala
@@ -141,12 +141,7 @@ class FirstTransform extends MiniPhaseTransform with IdentityDenotTransformer wi
val tparams = tycon.tpe.typeSymbol.typeParams
val bounds = tparams.map(tparam =>
tparam.info.asSeenFrom(tycon.tpe.normalizedPrefix, tparam.owner.owner).bounds)
- def instantiateUpperBound(tp: Type, argTypes: List[Type]): Type = {
- tp.substDealias(tparams, argTypes).bounds.hi
- // not that argTypes can contain a TypeBounds type for arguments that are
- // not fully determined. In that case we need to check against the hi bound.
- }
- Checking.checkBounds(args, bounds, instantiateUpperBound)
+ Checking.checkBounds(args, bounds, _.substDealias(tparams, _))
normalizeType(tree)
case tree =>
normalizeType(tree)