diff options
Diffstat (limited to 'test/codegen/switch.go')
| -rw-r--r-- | test/codegen/switch.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/codegen/switch.go b/test/codegen/switch.go index 6778c65ab3..b0186ba5b7 100644 --- a/test/codegen/switch.go +++ b/test/codegen/switch.go @@ -139,3 +139,12 @@ func interfaceSwitch(x any) int { return 3 } } + +func interfaceCast(x any) int { + // amd64:`CALL\truntime.typeAssert`,`MOVL\t16\(.*\)`,`MOVQ\t8\(.*\)(.*\*1)` + // arm64:`CALL\truntime.typeAssert`,`LDAR`,`MOVWU`,`MOVD\t\(R.*\)\(R.*\)` + if _, ok := x.(I); ok { + return 3 + } + return 5 +} |
