Rémy Oudompheng | 2ece2f5 | 2012-02-18 22:15:42 +0100 | [diff] [blame] | 1 | // run |
Luuk van Dijk | 5efd562 | 2012-02-06 15:41:01 +0100 | [diff] [blame] | 2 | |
Emmanuel Odeke | 53fd522 | 2016-04-10 14:32:26 -0700 | [diff] [blame] | 3 | // Copyright 2012 The Go Authors. All rights reserved. |
Luuk van Dijk | 5efd562 | 2012-02-06 15:41:01 +0100 | [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 | // Issue 2821 |
| 8 | package main |
| 9 | |
| 10 | type matrix struct { |
| 11 | e []int |
| 12 | } |
| 13 | |
| 14 | func (a matrix) equal() bool { |
| 15 | for _ = range a.e { |
| 16 | } |
Russ Cox | 8d504c4 | 2014-07-16 19:27:10 -0400 | [diff] [blame] | 17 | for range a.e { |
| 18 | } |
Luuk van Dijk | 5efd562 | 2012-02-06 15:41:01 +0100 | [diff] [blame] | 19 | return true |
| 20 | } |
| 21 | |
| 22 | func main() { |
| 23 | var a matrix |
| 24 | var i interface{} |
| 25 | i = true && a.equal() |
| 26 | _ = i |
| 27 | } |