Files
go-legacy-win7/test/fixedbugs/issue24755.go

20 lines
301 B
Go
Raw Normal View History

2025-02-14 12:42:07 +07:00
// errorcheck
2024-09-21 23:49:08 +10:00
// Copyright 2024 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.
2025-02-14 12:42:07 +07:00
package p
type I interface {
F()
}
type T struct {
}
2024-09-21 23:49:08 +10:00
2025-02-14 12:42:07 +07:00
const _ = I((*T)(nil)) // ERROR "is not constant"
2024-09-21 23:49:08 +10:00
2025-02-14 12:42:07 +07:00
func (*T) F() {
2024-09-21 23:49:08 +10:00
}