mirror of
https://github.com/golang/go
synced 2024-11-18 05:24:47 -07:00
daffc2d2ef
This change removes the special case which existed for handling the initalization of the main package, so that other modules named 'main' get properly initialized when imported. Note that gotest of main packages will break in most cases without this. R=rsc CC=golang-dev https://golang.org/cl/4190050
19 lines
390 B
Go
19 lines
390 B
Go
// errchk $G -e $D/$F.go
|
|
|
|
// Copyright 2011 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package main
|
|
|
|
import "runtime"
|
|
|
|
func init() {
|
|
}
|
|
|
|
func main() {
|
|
init() // ERROR "undefined: init"
|
|
runtime.init() // ERROR "unexported.*runtime\.init"
|
|
var _ = init // ERROR "undefined: init"
|
|
}
|