Browse Source

compiler.go: createBuiltin: accept alias for slice. Helps 1.18 tests pass.

With proper fix by Ayke.
pull/2727/head
Dan Kegel 3 years ago
committed by Ayke
parent
commit
aa421bf655
  1. 2
      compiler/compiler.go

2
compiler/compiler.go

@ -1233,7 +1233,7 @@ func (b *builder) createBuiltin(argTypes []types.Type, argValues []llvm.Value, c
case "cap":
value := argValues[0]
var llvmCap llvm.Value
switch argTypes[0].(type) {
switch argTypes[0].Underlying().(type) {
case *types.Chan:
llvmCap = b.createRuntimeCall("chanCap", []llvm.Value{value}, "cap")
case *types.Slice:

Loading…
Cancel
Save