Created
October 3, 2021 03:20
-
-
Save devrath/32f5315522f4e63eee9ce2e3e5abb648 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") | |
| pkgone.MyViewClass().display() | |
| pkgtwo.MyViewClass().display() | |
| pkgthree.MyViewClass().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