aboutsummaryrefslogtreecommitdiffhomepage
path: root/compiler/func.go
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/func.go')
-rw-r--r--compiler/func.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/func.go b/compiler/func.go
index 544f3e5fa..2d14d47a2 100644
--- a/compiler/func.go
+++ b/compiler/func.go
@@ -125,11 +125,13 @@ func (c *compilerContext) getRawFuncType(typ *types.Signature) llvm.Type {
// The receiver is not an interface, but a i8* type.
recv = c.i8ptrType
}
- paramTypes = append(paramTypes, expandFormalParamType(recv)...)
+ recvFragments, _ := expandFormalParamType(recv, nil)
+ paramTypes = append(paramTypes, recvFragments...)
}
for i := 0; i < typ.Params().Len(); i++ {
subType := c.getLLVMType(typ.Params().At(i).Type())
- paramTypes = append(paramTypes, expandFormalParamType(subType)...)
+ paramTypeFragments, _ := expandFormalParamType(subType, nil)
+ paramTypes = append(paramTypes, paramTypeFragments...)
}
// All functions take these parameters at the end.
paramTypes = append(paramTypes, c.i8ptrType) // context