diff --git a/lib/Sema/CSSyntacticElement.cpp b/lib/Sema/CSSyntacticElement.cpp index e90859f7805ba..9fb95156411d9 100644 --- a/lib/Sema/CSSyntacticElement.cpp +++ b/lib/Sema/CSSyntacticElement.cpp @@ -803,8 +803,7 @@ class SyntacticElementConstraintGenerator auto projectedTy = computeProjectedValueType(wrappedVar, wrapperTy); // The projected type may have an error, make sure we turn it into a hole // if necessary. - ASSERT(!projectedTy->hasUnboundGenericType() && - !projectedTy->hasPlaceholder()); + ASSERT(!projectedTy->hasUnboundGenericType()); projectedTy = cs.replaceInferableTypesWithTypeVars(projectedTy, locator); cs.setType(projectedVal, projectedTy); } diff --git a/validation-test/compiler_crashers_fixed/SyntacticElementConstraintGenerator-visitDecl-8830af.swift b/validation-test/compiler_crashers_fixed/SyntacticElementConstraintGenerator-visitDecl-8830af.swift new file mode 100644 index 0000000000000..0bb9336472d95 --- /dev/null +++ b/validation-test/compiler_crashers_fixed/SyntacticElementConstraintGenerator-visitDecl-8830af.swift @@ -0,0 +1,11 @@ +// {"kind":"typecheck","original":"25782df5","signature":"(anonymous namespace)::SyntacticElementConstraintGenerator::visitDecl(swift::Decl*)","signatureAssert":"Assertion failed: (!projectedTy->hasUnboundGenericType() && !projectedTy->hasPlaceholder()), function setPropertyWrapperAuxiliaryTypes"} +// RUN: not %target-swift-frontend -typecheck %s +@propertyWrapper +struct a< + b +> { + projectedValue : Self var wrappedValue: b +} +{ + @a var c: <#type#> +}