mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Previously, the test didn't actually verify that the called witness method was the witness method from the right method--all the methods had the same implementation and just forwarded the type along to be printed. Now an id specific to each method is printed as well.
13 lines
248 B
Swift
13 lines
248 B
Swift
import Swift
|
|
|
|
@_silgen_name("printGenericType")
|
|
public func printGenericType<T>(_ t: T.Type) {
|
|
print(T.self)
|
|
}
|
|
|
|
@_silgen_name("printGenericTypeAndWord")
|
|
public func printGenericType<T>(_ t: T.Type, _ w: Builtin.Word) {
|
|
print(T.self, Int(w))
|
|
}
|
|
|