2012-02-16 21:50:37 -07:00
|
|
|
// compile
|
2012-01-23 07:19:02 -07:00
|
|
|
|
2016-04-10 15:32:26 -06:00
|
|
|
// Copyright 2012 The Go Authors. All rights reserved.
|
2012-01-23 07:19:02 -07:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
// Used to crash compiler in interface type equality check.
|
|
|
|
|
|
|
|
package p
|
|
|
|
|
2016-05-05 19:03:59 -06:00
|
|
|
type i1 interface {
|
|
|
|
F() interface{i1}
|
2012-01-23 07:19:02 -07:00
|
|
|
}
|
|
|
|
|
2016-05-05 19:03:59 -06:00
|
|
|
type i2 interface {
|
|
|
|
F() interface{i2}
|
2012-01-23 07:19:02 -07:00
|
|
|
}
|
|
|
|
|
2016-05-05 19:03:59 -06:00
|
|
|
var v1 i1
|
|
|
|
var v2 i2
|
2012-01-23 07:19:02 -07:00
|
|
|
|
|
|
|
func f() bool {
|
|
|
|
return v1 == v2
|
|
|
|
}
|
2016-05-05 19:03:59 -06:00
|
|
|
|
|
|
|
// TODO(gri) Change test to use exported interfaces.
|
|
|
|
// See issue #15596 for details.
|