mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Remove ImplicitlyUnwrappedOptionalType.
We haven't been creating these since https://github.com/apple/swift/pull/14299 but there was more groundwork before we could actually remove the type definition.
This commit is contained in:
@@ -150,8 +150,7 @@ ABSTRACT_SUGARED_TYPE(Sugar, Type)
|
||||
ABSTRACT_SUGARED_TYPE(UnarySyntaxSugar, SyntaxSugarType)
|
||||
SUGARED_TYPE(ArraySlice, UnarySyntaxSugarType)
|
||||
SUGARED_TYPE(Optional, UnarySyntaxSugarType)
|
||||
SUGARED_TYPE(ImplicitlyUnwrappedOptional, UnarySyntaxSugarType)
|
||||
TYPE_RANGE(UnarySyntaxSugar, ArraySlice, ImplicitlyUnwrappedOptional)
|
||||
TYPE_RANGE(UnarySyntaxSugar, ArraySlice, Optional)
|
||||
SUGARED_TYPE(Dictionary, SyntaxSugarType)
|
||||
TYPE_RANGE(SyntaxSugar, ArraySlice, Dictionary)
|
||||
TYPE_RANGE(Sugar, Paren, Dictionary)
|
||||
|
||||
@@ -4102,26 +4102,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/// The type T!, which is always sugar for a library type.
|
||||
class ImplicitlyUnwrappedOptionalType : public UnarySyntaxSugarType {
|
||||
ImplicitlyUnwrappedOptionalType(const ASTContext &ctx, Type base,
|
||||
RecursiveTypeProperties properties)
|
||||
: UnarySyntaxSugarType(TypeKind::ImplicitlyUnwrappedOptional, ctx, base,
|
||||
properties) {
|
||||
llvm_unreachable(
|
||||
"ImplicitlyUnwrappedOptionalType::ImplicitlyUnwrappedOptionalType");
|
||||
}
|
||||
|
||||
public:
|
||||
/// Return a uniqued optional type with the specified base type.
|
||||
static ImplicitlyUnwrappedOptionalType *get(Type baseTy);
|
||||
|
||||
// Implement isa/cast/dyncast/etc.
|
||||
static bool classof(const TypeBase *T) {
|
||||
return T->getKind() == TypeKind::ImplicitlyUnwrappedOptional;
|
||||
}
|
||||
};
|
||||
|
||||
/// The dictionary type [K : V], which is syntactic sugar for Dictionary<K, V>.
|
||||
///
|
||||
/// Example:
|
||||
|
||||
Reference in New Issue
Block a user