Skip to content

Commit 055979e

Browse files
committed
compiler.go: createBuiltin: accept alias for slice. Helps 1.18 tests pass.
With proper fix by Ayke.
1 parent 1fb1f08 commit 055979e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/compiler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ func (b *builder) createBuiltin(argTypes []types.Type, argValues []llvm.Value, c
12331233
case "cap":
12341234
value := argValues[0]
12351235
var llvmCap llvm.Value
1236-
switch argTypes[0].(type) {
1236+
switch argTypes[0].Underlying().(type) {
12371237
case *types.Chan:
12381238
llvmCap = b.createRuntimeCall("chanCap", []llvm.Value{value}, "cap")
12391239
case *types.Slice:

0 commit comments

Comments
 (0)