src/cmd/vet/testdata/deadcode/deadcode.go
raw| 1 | // Copyright 2013 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | // This file contains tests for the dead code checker. |
| 6 | |
| 7 | package deadcode |
| 8 | |
| 9 | func _() int { |
| 10 | print(1) |
| 11 | return 2 |
| 12 | println() // ERROR "unreachable code" |
| 13 | return 3 |
| 14 | } |