Last active
October 3, 2021 04:35
-
-
Save devrath/820ab0355200859ba5ff9f9578589bf5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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