1 // Copyright 2019 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.
5 //go:build compiler_bootstrap
6 // +build compiler_bootstrap
8 // This version used only for bootstrap (on this path we want
9 // to avoid use of go:linkname as applied to variables).
13 type errorString
string
15 func (e errorString
) RuntimeError() {}
17 func (e errorString
) Error() string {
18 return "runtime error: " + string(e
)
21 var overflowError
= error(errorString("integer overflow"))
23 var divideError
= error(errorString("integer divide by zero"))