Add #self, #Self to #function, #file, #line, #column

If we're not going the #context way then I would also like to pitch the need for #module static string. And as mentioned in the other thread I would like to have a general #type(T) to extract generic type parameter as a static string (if that's technically possible). Or something like this maybe:

extension StaticString {
   init<T>(_ type: T.Type) { ... }
}

// The rest would be trivial
func work<T>(_ type: StaticString = .init(T.self)) { ... }
2 Likes