Created
July 16, 2017 00:00
Testing Kotlin's @JvmSynthetic annotation
This file contains 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
package foo | |
class Apple | |
fun Apple.slice() { } | |
@JvmSynthetic | |
fun Apple.peel() { } |
This file contains 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
package foo; | |
public class JavaKnife { | |
void test() { | |
Apple apple = new Apple(); | |
foo.AppleKt.slice(apple); | |
foo.AppleKt.peel(apple); // Cannot resolve method 'peel(foo.Apple)' | |
} | |
} |
This file contains 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
package foo | |
class KotlinKnife { | |
fun test() { | |
val apple = Apple() | |
apple.slice() | |
apple.peel() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment