Skip to content

Instantly share code, notes, and snippets.

@devrath
Last active October 3, 2021 04:35
Show Gist options
  • Select an option

  • Save devrath/820ab0355200859ba5ff9f9578589bf5 to your computer and use it in GitHub Desktop.

Select an option

Save devrath/820ab0355200859ba5ff9f9578589bf5 to your computer and use it in GitHub Desktop.
// Define the type alisas in a class
import pkgone.MyViewClass
typealias PkgOneClass = MyViewClass
typealias PkgTwoClass = pkgtwo.MyViewClass
typealias PkgThreeClass = pkgthree.MyViewClass
// Main function
fun main() {
println("Start")
PkgOneClass().display()
PkgTwoClass().display()
PkgThreeClass().display()
println("End")
}
// ----> MyViewClass in pkgone
package pkgone
class MyViewClass {
fun display(){
println("PKG-ONE: "+"😎😎😎")
}
}
// ----> MyViewClass in pkgtwo
package pkgtwo
class MyViewClass {
fun display(){
println("PKG-TWO: "+"😎😎😎")
}
}
// ----> MyViewClass in pkgthree
package pkgthree
class MyViewClass {
fun display(){
println("PKG-Three: "+"😎😎😎")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment