3
// Copyright 2012 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.
22
switch pT.val { // error should be here - line 22
25
case 1: // used to show up here instead
30
fmt.Println("finished")
33
func expectError(expectLine int) {
35
panic("did not crash")
38
_, file, line, ok := runtime.Caller(i)
40
panic("cannot find issue4562.go on stack")
42
if strings.HasSuffix(file, "issue4562.go") {
43
if line != expectLine {
44
panic(fmt.Sprintf("crashed at line %d, wanted line %d", line, expectLine))