| // Copyright 2014 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| package issues |
| |
| import "fmt" |
| |
| func issue7035() { |
| type T struct{ X int } |
| _ = func() { |
| fmt.Println() // must refer to imported fmt rather than the fmt below |
| } |
| fmt := new(T) |
| _ = fmt.X |
| } |
| |
| func issue8066() { |
| const ( |
| // TODO(gri) Enable test below for releases 1.4 and higher |
| // _ = float32(340282356779733661637539395458142568447) |
| _ = float32(340282356779733661637539395458142568448 /* ERROR cannot convert */ ) |
| ) |
| } |
| |
| // Check that a missing identifier doesn't lead to a spurious error cascade. |
| func issue8799a() { |
| x, ok := missing /* ERROR undeclared */ () |
| _ = !ok |
| _ = x |
| } |
| |
| func issue8799b(x int, ok bool) { |
| x, ok = missing /* ERROR undeclared */ () |
| _ = !ok |
| _ = x |
| } |