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
345
345
val tree1 @ TypeApply (fn, args) = normalizeTypeArgs(tree)
346
346
for arg <- args do
347
347
checkInferredWellFormed(arg)
348
- Checking .checkGoodBounds(arg.tpe, arg.srcPos)
348
+ if ! arg.span.isSynthetic 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)
349
353
if (fn.symbol != defn.ChildAnnot .primaryConstructor)
350
354
// Make an exception for ChildAnnot, which should really have AnyKind bounds
351
355
Checking .checkBounds(args, fn.tpe.widen.asInstanceOf [PolyType ])
You can’t perform that action at this time.
0 commit comments