Ian Lance Taylor | e27b0cd | 2013-09-17 18:06:58 -0700 | [diff] [blame] | 1 | // compile |
| 2 | |
Emmanuel Odeke | 53fd522 | 2016-04-10 14:32:26 -0700 | [diff] [blame] | 3 | // Copyright 2013 The Go Authors. All rights reserved. |
Ian Lance Taylor | e27b0cd | 2013-09-17 18:06:58 -0700 | [diff] [blame] | 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
| 7 | // Logical operation on named boolean type returns the same type, |
Martin Olsson | 5499034 | 2013-12-27 08:59:02 -0800 | [diff] [blame] | 8 | // supporting an implicit conversion to an interface type. This used |
Ian Lance Taylor | e27b0cd | 2013-09-17 18:06:58 -0700 | [diff] [blame] | 9 | // to crash gccgo. |
| 10 | |
| 11 | package p |
| 12 | |
| 13 | type B bool |
| 14 | |
| 15 | func (b B) M() {} |
| 16 | |
| 17 | type I interface { |
| 18 | M() |
| 19 | } |
| 20 | |
| 21 | func F(a, b B) I { |
| 22 | return a && b |
| 23 | } |