blob: 89f59e3edb1688dd1f63c4aa758d85de144d1983 [file] [log] [blame]
Russ Cox57eb06f2012-02-16 23:51:04 -05001// errorcheck
Russ Cox22a5c782009-10-15 23:10:49 -07002
3// Copyright 2009 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
Rob Pike19bab1d2012-02-24 10:30:39 +11007// Test that even if a file imports runtime,
Russ Cox22a5c782009-10-15 23:10:49 -07008// it cannot get at the low-level runtime definitions
Rob Pike19bab1d2012-02-24 10:30:39 +11009// known to the compiler. For normal packages
Russ Cox22a5c782009-10-15 23:10:49 -070010// the compiler doesn't even record the lower case
11// functions in its symbol table, but some functions
12// in runtime are hard-coded into the compiler.
Rob Pike19bab1d2012-02-24 10:30:39 +110013// Does not compile.
Russ Cox22a5c782009-10-15 23:10:49 -070014
15package main
16
17import "runtime"
18
19func main() {
Rob Pike4f61fc92010-09-04 10:36:13 +100020 runtime.printbool(true) // ERROR "unexported"
Russ Cox22a5c782009-10-15 23:10:49 -070021}