Emmanuel Odeke | 53fd522 | 2016-04-10 14:32:26 -0700 | [diff] [blame] | 1 | // Copyright 2012 The Go Authors. All rights reserved. |
David Symonds | c3eddc4 | 2012-01-21 17:02:54 +1100 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
Rob Pike | 13514d4 | 2012-02-19 17:33:41 +1100 | [diff] [blame] | 5 | // Test that the mutually recursive types in recursive1.go made it |
David Symonds | c3eddc4 | 2012-01-21 17:02:54 +1100 | [diff] [blame] | 6 | // intact and with the same meaning, by assigning to or using them. |
| 7 | |
| 8 | package main |
| 9 | |
| 10 | import "./recursive1" |
| 11 | |
| 12 | func main() { |
| 13 | var i1 p.I1 |
| 14 | var i2 p.I2 |
| 15 | i1 = i2 |
| 16 | i2 = i1 |
| 17 | i1 = i2.F() |
| 18 | i2 = i1.F() |
| 19 | _, _ = i1, i2 |
| 20 | } |