mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 15:53:49 +00:00
Introduce Parameter: Java -> Kotlin Interoperability
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
class A {
|
||||
int x;
|
||||
|
||||
A(int x) {
|
||||
this.x = x;
|
||||
}
|
||||
}
|
||||
|
||||
class J {
|
||||
int foo(int a, int b, int c) {
|
||||
return <selection>new A(a + b)</selection>.x * c
|
||||
}
|
||||
}
|
||||
|
||||
class Test {
|
||||
void test() {
|
||||
new J().foo(1, 2, 3);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user