translator: fix methods argument order
This commit is contained in:
@@ -15,7 +15,7 @@ class FunctionCodegen(override val state: TranslationState, override val variabl
|
|||||||
BlockCodegen(state, variableManager, codeBuilder) {
|
BlockCodegen(state, variableManager, codeBuilder) {
|
||||||
|
|
||||||
var name = function.fqName.toString()
|
var name = function.fqName.toString()
|
||||||
var args = ArrayList<LLVMVariable>()
|
var args = LinkedList<LLVMVariable>()
|
||||||
|
|
||||||
init {
|
init {
|
||||||
val descriptor = state.bindingContext.get(BindingContext.FUNCTION, function)!!
|
val descriptor = state.bindingContext.get(BindingContext.FUNCTION, function)!!
|
||||||
@@ -58,7 +58,7 @@ class FunctionCodegen(override val state: TranslationState, override val variabl
|
|||||||
var external = false
|
var external = false
|
||||||
|
|
||||||
if (this_type != null) {
|
if (this_type != null) {
|
||||||
args.add(this_type)
|
args.addFirst(this_type)
|
||||||
}
|
}
|
||||||
args.forEach {
|
args.forEach {
|
||||||
val type = it.type
|
val type = it.type
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
class_methods_1(55) == 60
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
class class_methods_1_class() {
|
||||||
|
fun method(t : Int): Int {
|
||||||
|
return t + 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun class_methods_1(zz: Int): Int {
|
||||||
|
val x = class_methods_1_class()
|
||||||
|
return x.method(zz)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user