mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
Refactor method/constructor calls in codegen
- use ResolvedCall where possible - 'call' parameter to invokeMethodWithArguments was used only to generate callee, e.g. in "A()" where A is an expression which can be invoke()'d. In case of constructors and enum entry delegation specifiers there's no need to generate callee, so 'call' is made Nullable with a subsequent assert - remove generateJavaConstructorCall() method, since it did no useful work. Java constructor invocation is broken anyway and needs to be fixed (KT-3532) - minor code style / formatting issues fixed, several methods renamed to better reflect semantics
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
public A() {}
|
||||
|
||||
public A(String x) {}
|
||||
|
||||
public A(long l, double z) {}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fun box(): String {
|
||||
A()
|
||||
A("")
|
||||
A(0.toLong(), 0.0)
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user