mirror of
https://github.com/golang/go
synced 2024-11-18 03:44:46 -07:00
868a110c56
Otherwise, if -d=panic was set, check2 will treat already reported error as internal compiler error. For #43311 Fixes #44445 Change-Id: I5dbe06334666df21d9107396b9dcfdd905aa1e44 Reviewed-on: https://go-review.googlesource.com/c/go/+/294850 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
28 lines
601 B
Go
28 lines
601 B
Go
// errorcheck -d=panic
|
|
|
|
// Copyright 2011 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.
|
|
|
|
// issue 1979
|
|
// used to get internal compiler error too
|
|
|
|
package main
|
|
|
|
import (
|
|
// avoid imported and not used errors
|
|
// "io/ioutil"
|
|
"net/http"
|
|
// "os"
|
|
)
|
|
|
|
func makeHandler(fn func(http.ResponseWriter, *http.Request, string)) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) // ERROR "syntax error|not an expression|invalid use of type"
|
|
}
|
|
|
|
type Page struct {
|
|
Title string
|
|
Body []byte
|
|
}
|
|
|