class DownloadStructure(val name: String, val link: String, val size: Int) {
fun fmap (f: (String) -> String): DownloadStructure = DownloadStructure(name, f(link), size)
} // why this would cause class Redeclaration error?
m
Matteo Mirk
04/16/2021, 6:31 AM
it works for me, I’m using Kotlin 1.4.32… maybe you have another declaration of DownloadStructure somewhere that you’re overlooking?
i
Ifvwm
04/16/2021, 7:30 AM
yes, you're right, it's already defined in another file, thanks