File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -345,7 +345,11 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
345345 val tree1 @ TypeApply (fn, args) = normalizeTypeArgs(tree)
346346 for arg <- args do
347347 checkInferredWellFormed(arg)
348- Checking .checkGoodBounds(arg.tpe, arg.srcPos)
348+ if ! arg.span.isZeroExtent then
349+ // only check explicit type arguments. We rely on inferred type arguments
350+ // to either have good bounds (if they come from a constraint), or be derived
351+ // from values that recursively need to have good bounds.
352+ Checking .checkGoodBounds(arg.tpe, arg.srcPos)
349353 if (fn.symbol != defn.ChildAnnot .primaryConstructor)
350354 // Make an exception for ChildAnnot, which should really have AnyKind bounds
351355 Checking .checkBounds(args, fn.tpe.widen.asInstanceOf [PolyType ])
You can’t perform that action at this time.
0 commit comments