https://kotlinlang.org logo
Title
j

joejungmann

10/12/2017, 4:14 PM
I have a name clash for a few different classes. Is it possible to rename it globally instead of needing to put
import foo.Bar as bBar
in all my files?
k

karelpeeters

10/12/2017, 4:27 PM
Rename the class, otherwise I don't think so.
r

russhwolf

10/12/2017, 4:59 PM
you could use a
typealias
and reference that everywhere instead
j

joejungmann

10/12/2017, 5:12 PM
Yeah I tried the typealias but it doesn't work if I use method references,
printer::print
r

russhwolf

10/12/2017, 5:17 PM
Really? I wonder if that's a bug. Seems like the sort of thing you should be able to do, but I haven't actually done much with type aliases myself.