mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
IUO: Update code completion output for constructor result types.
Update the code that prints types for constructor results to take into account IUO types being removed from the type system. NFC on master. Results in better fidelity with what we have today when IUOs are removed from the type system in a future commit.
This commit is contained in:
@@ -2644,9 +2644,15 @@ public:
|
||||
|
||||
addThrows(Builder, ConstructorType, CD);
|
||||
|
||||
addTypeAnnotation(Builder,
|
||||
Result.hasValue() ? Result.getValue() :
|
||||
ConstructorType->getResult());
|
||||
if (CD->getAttrs().hasAttribute<ImplicitlyUnwrappedOptionalAttr>()) {
|
||||
addTypeAnnotationForImplicitlyUnwrappedOptional(
|
||||
Builder, Result.hasValue() ? Result.getValue()
|
||||
: ConstructorType->getResult());
|
||||
} else {
|
||||
addTypeAnnotation(Builder, Result.hasValue()
|
||||
? Result.getValue()
|
||||
: ConstructorType->getResult());
|
||||
}
|
||||
};
|
||||
|
||||
if (ConstructorType && hasInterestingDefaultValues(CD))
|
||||
|
||||
Reference in New Issue
Block a user