blob: 8a026a52f5ea1d6b62c927e1485403b7c70b6727 [file] [log] [blame]
// Copyright 2023 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.
// WARNING: Please avoid updating this file.
// See the warning in ../devirt.go for more details.
package mult
var sink int
type Multiplier interface {
Multiply(a, b int) int
}
type Mult struct{}
func (Mult) Multiply(a, b int) int {
for i := 0; i < 1000; i++ {
sink++
}
return a * b
}
type NegMult struct{}
func (NegMult) Multiply(a, b int) int {
for i := 0; i < 1000; i++ {
sink++
}
return -1 * a * b
}