mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: add var ProtocolDecl.isMarkerProtocol
This commit is contained in:
committed by
Arnold Schwaighofer
parent
b218d9ab5c
commit
1486d009b0
@@ -76,6 +76,7 @@ final public class ClassDecl: NominalTypeDecl {
|
|||||||
|
|
||||||
final public class ProtocolDecl: NominalTypeDecl {
|
final public class ProtocolDecl: NominalTypeDecl {
|
||||||
public var requiresClass: Bool { bridged.ProtocolDecl_requiresClass() }
|
public var requiresClass: Bool { bridged.ProtocolDecl_requiresClass() }
|
||||||
|
public var isMarkerProtocol: Bool { bridged.ProtocolDecl_isMarkerProtocol() }
|
||||||
}
|
}
|
||||||
|
|
||||||
final public class BuiltinTupleDecl: NominalTypeDecl {}
|
final public class BuiltinTupleDecl: NominalTypeDecl {}
|
||||||
|
|||||||
@@ -335,6 +335,7 @@ struct BridgedDeclObj {
|
|||||||
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE BridgedASTType Class_getSuperclass() const;
|
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE BridgedASTType Class_getSuperclass() const;
|
||||||
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE BridgedDeclObj Class_getDestructor() const;
|
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE BridgedDeclObj Class_getDestructor() const;
|
||||||
BRIDGED_INLINE bool ProtocolDecl_requiresClass() const;
|
BRIDGED_INLINE bool ProtocolDecl_requiresClass() const;
|
||||||
|
BRIDGED_INLINE bool ProtocolDecl_isMarkerProtocol() const;
|
||||||
BRIDGED_INLINE bool AbstractFunction_isOverridden() const;
|
BRIDGED_INLINE bool AbstractFunction_isOverridden() const;
|
||||||
BRIDGED_INLINE bool Destructor_isIsolated() const;
|
BRIDGED_INLINE bool Destructor_isIsolated() const;
|
||||||
BRIDGED_INLINE bool EnumElementDecl_hasAssociatedValues() const;
|
BRIDGED_INLINE bool EnumElementDecl_hasAssociatedValues() const;
|
||||||
|
|||||||
@@ -222,6 +222,10 @@ bool BridgedDeclObj::ProtocolDecl_requiresClass() const {
|
|||||||
return getAs<swift::ProtocolDecl>()->requiresClass();
|
return getAs<swift::ProtocolDecl>()->requiresClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BridgedDeclObj::ProtocolDecl_isMarkerProtocol() const {
|
||||||
|
return getAs<swift::ProtocolDecl>()->isMarkerProtocol();
|
||||||
|
}
|
||||||
|
|
||||||
bool BridgedDeclObj::AbstractFunction_isOverridden() const {
|
bool BridgedDeclObj::AbstractFunction_isOverridden() const {
|
||||||
return getAs<swift::AbstractFunctionDecl>()->isOverridden();
|
return getAs<swift::AbstractFunctionDecl>()->isOverridden();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user