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

With proper fix by Ayke.
This commit is contained in:
Dan Kegel
2022-03-18 08:44:17 -07:00
committed by Ayke
parent 1fb1f08233
commit aa421bf655
+1 -1
View File
@@ -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: