I know it is possible to pass class type to a function in swift:
func setGeneric(type: T.Type){ } setGeneric(Int.self)
But how we can
It works when I modify your function like this:
func getGeneric(object: T) -> T.Type { return T.self } getGeneric(0) // Swift.Int