Change-Id: I0db78c67fcb1e7f2f2aaeed06a54414e634e8ab3
This commit is contained in:
Mateusz Poliwczak 2025-02-16 18:23:35 +01:00
parent ea879c683e
commit 4bfc901917
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
// asmcheck
// Copyright 2025 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This test makes sure that we statically load a type from an itab, instead
// of doing a indirect load from thet itab.
package codegen
type M interface{ M() }
type A interface{ A() }
type Impl struct{}
func (*Impl) M() {}
func (*Impl) A() {}
func main() {
var a M = &Impl{}
// amd64:`LEAQ\ttype:.*Impl`
a.(A).A()
}