2012-02-16 21:51:04 -07:00
|
|
|
// errorcheck
|
2009-10-16 00:10:49 -06:00
|
|
|
|
2016-04-10 15:32:26 -06:00
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
2009-10-16 00:10:49 -06:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2012-02-23 16:30:39 -07:00
|
|
|
// Test that even if a file imports runtime,
|
2009-10-16 00:10:49 -06:00
|
|
|
// it cannot get at the low-level runtime definitions
|
2012-02-23 16:30:39 -07:00
|
|
|
// known to the compiler. For normal packages
|
2009-10-16 00:10:49 -06:00
|
|
|
// the compiler doesn't even record the lower case
|
|
|
|
// functions in its symbol table, but some functions
|
|
|
|
// in runtime are hard-coded into the compiler.
|
2012-02-23 16:30:39 -07:00
|
|
|
// Does not compile.
|
2009-10-16 00:10:49 -06:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import "runtime"
|
|
|
|
|
|
|
|
func main() {
|
2020-12-08 23:01:22 -07:00
|
|
|
runtime.printbool(true) // ERROR "unexported|undefined"
|
2009-10-16 00:10:49 -06:00
|
|
|
}
|