Rémy Oudompheng | 2ece2f5 | 2012-02-18 22:15:42 +0100 | [diff] [blame] | 1 | // compile |
Anthony Martin | 94df1a0 | 2011-01-05 13:12:30 -0500 | [diff] [blame] | 2 | |
| 3 | // Copyright 2010 The Go Authors. All rights reserved. |
| 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 1369. |
| 8 | |
| 9 | package main |
| 10 | |
| 11 | const ( |
Russ Cox | f2b5a07 | 2011-01-19 23:09:00 -0500 | [diff] [blame] | 12 | c = complex(1, 2) |
Anthony Martin | 94df1a0 | 2011-01-05 13:12:30 -0500 | [diff] [blame] | 13 | r = real(c) // was: const initializer must be constant |
| 14 | i = imag(c) // was: const initializer must be constant |
| 15 | ) |
| 16 | |
| 17 | func main() {} |