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() {
|
2010-09-03 18:36:13 -06:00
|
|
|
runtime.printbool(true) // ERROR "unexported"
|
2009-10-16 00:10:49 -06:00
|
|
|
}
|