2015-08-21 20:24:20 -06:00
|
|
|
// errorcheck
|
|
|
|
|
2016-04-10 15:32:26 -06:00
|
|
|
// Copyright 2015 The Go Authors. All rights reserved.
|
2015-08-21 20:24:20 -06:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2015-10-03 19:23:23 -06:00
|
|
|
// Issue 10975: Returning an invalid interface would cause
|
|
|
|
// `internal compiler error: getinarg: not a func`.
|
2015-08-21 20:24:20 -06:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
type I interface {
|
2015-10-03 19:23:23 -06:00
|
|
|
int // ERROR "interface contains embedded non-interface int"
|
2015-08-21 20:24:20 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
func New() I {
|
|
|
|
return struct{}{}
|
|
|
|
}
|