Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ AG_EXPORT
AG_REFINED_FOR_SWIFT
AGTypeKind AGTypeGetKind(AGTypeID typeID) AG_SWIFT_NAME(getter:AGTypeID.kind(self:));

AG_EXPORT
AG_REFINED_FOR_SWIFT
const void * AGTypeNominalDescriptor(AGTypeID typeID) AG_SWIFT_NAME(getter:AGTypeID.nominalDescriptor(self:));

AG_EXTERN_C_END

#endif /* AGTypeID_h */
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ AG_EXPORT
AG_REFINED_FOR_SWIFT
AGTypeKind AGTypeGetKind(AGTypeID typeID) AG_SWIFT_NAME(getter:AGTypeID.kind(self:));

AG_EXPORT
AG_REFINED_FOR_SWIFT
const void * AGTypeNominalDescriptor(AGTypeID typeID) AG_SWIFT_NAME(getter:AGTypeID.nominalDescriptor(self:));

AG_EXTERN_C_END

#endif /* AGTypeID_h */
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ AG_EXPORT
AG_REFINED_FOR_SWIFT
AGTypeKind AGTypeGetKind(AGTypeID typeID) AG_SWIFT_NAME(getter:AGTypeID.kind(self:));

AG_EXPORT
AG_REFINED_FOR_SWIFT
const void * AGTypeNominalDescriptor(AGTypeID typeID) AG_SWIFT_NAME(getter:AGTypeID.nominalDescriptor(self:));

AG_EXTERN_C_END

#endif /* AGTypeID_h */
4 changes: 4 additions & 0 deletions AG/Sources/Headers/AGTypeID.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ AG_EXPORT
AG_REFINED_FOR_SWIFT
AGTypeKind AGTypeGetKind(AGTypeID typeID) AG_SWIFT_NAME(getter:AGTypeID.kind(self:));

AG_EXPORT
AG_REFINED_FOR_SWIFT
const void * AGTypeNominalDescriptor(AGTypeID typeID) AG_SWIFT_NAME(getter:AGTypeID.nominalDescriptor(self:));

AG_EXTERN_C_END

#endif /* AGTypeID_h */
4 changes: 4 additions & 0 deletions Sources/_OpenGraph/Runtime/OGTypeID.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ OGTypeKind OGTypeGetKind(OGTypeID typeID) {
// FIXME: Unimplemented
return OGTypeKindNone;
}

const void * OGTypeNominalDescriptor(OGTypeID typeID) {
return nullptr;
}
4 changes: 4 additions & 0 deletions Sources/_OpenGraph/Runtime/OGTypeID.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ OG_EXPORT
OG_REFINED_FOR_SWIFT
OGTypeKind OGTypeGetKind(OGTypeID typeID) OG_SWIFT_NAME(getter:OGTypeID.kind(self:));

OG_EXPORT
OG_REFINED_FOR_SWIFT
const void * OGTypeNominalDescriptor(OGTypeID typeID) OG_SWIFT_NAME(getter:OGTypeID.nominalDescriptor(self:));

OG_EXTERN_C_END

#endif /* OGTypeID_h */
19 changes: 19 additions & 0 deletions Tests/OpenGraphCompatibilityTests/Runtime/OGTypeIDTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// OGTypeIDTests.swift
// OpenGraphCompatibilityTests

import Testing

@Suite(.disabled(if: !compatibilityTestEnabled, "OGTypeID is not implemented"))
struct OGTypeIDTests {

@Test
func descriptor() throws {
let n1 = try #require(OGTypeID(Int.self).nominalDescriptor)
let n2 = try #require(OGTypeID(String.self).nominalDescriptor)
let n3 = try #require(OGTypeID(Int.self).nominalDescriptor)

#expect(n1 != n2)
#expect(n1 == n3)
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//
// TupleTypeTests.swift
//
//
//
// OpenGraphCompatibilityTests

import Testing

Expand Down