Skip to content

Commit 003a685

Browse files
committed
type(of:)
1 parent 8553058 commit 003a685

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Source/Functions.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,17 @@ public func stride(from start: Double, through end: Double, by stride: Double) -
230230
}
231231
#endif
232232

233+
#if COOPER || TOFFEE
234+
@inline(always) public func type(of value: Any) -> Class {
235+
return typeOf(value)
236+
}
237+
#elseif ECHOES || ISLAND
238+
@inline(always) public func type(of value: Any) -> Type {
239+
return typeOf(value)
240+
}
241+
#endif
242+
243+
233244
#if TOFFEE
234245

235246
public func autoreleasepool<T>(_ act: () throws -> (T)) -> T throws {

0 commit comments

Comments
 (0)