2012-02-17 04:51:04 +00:00
|
|
|
// errorcheck
|
2009-10-16 06:10:49 +00:00
|
|
|
|
2016-04-10 21:32:26 +00:00
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
2009-10-16 06:10:49 +00:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2012-02-23 23:30:39 +00:00
|
|
|
// Test that even if a file imports runtime,
|
2009-10-16 06:10:49 +00:00
|
|
|
// it cannot get at the low-level runtime definitions
|
2012-02-23 23:30:39 +00:00
|
|
|
// known to the compiler. For normal packages
|
2009-10-16 06:10:49 +00: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 23:30:39 +00:00
|
|
|
// Does not compile.
|
2009-10-16 06:10:49 +00:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import "runtime"
|
|
|
|
|
|
|
|
func main() {
|
2020-12-09 06:01:22 +00:00
|
|
|
runtime.printbool(true) // ERROR "unexported|undefined"
|
2009-10-16 06:10:49 +00:00
|
|
|
}
|