]> Cypherpunks repositories - gostls13.git/commit
Revert "cmd/compile: improve error message if init is directly invoked"
authorRobert Griesemer <gri@golang.org>
Mon, 6 Mar 2017 23:41:56 +0000 (15:41 -0800)
committerRobert Griesemer <gri@golang.org>
Mon, 6 Mar 2017 23:48:37 +0000 (23:48 +0000)
commitcf710949a98aaac48a3d97660f7f6bb7d14f1ad7
tree0fec9266ae87fede63581903de386346cd60423d
parenta6bd42f2630aa8907009a1ec0c35048c20a7afae
Revert "cmd/compile: improve error message if init is directly invoked"

This reverts commit cb6e0639fb090ea0e129b1ddb956a7e645cff285.

The fix is incorrect as it's perfectly fine to refer to an
identifier 'init' inside a function, and 'init' may even be
a variable of function value. Misspelling 'init' in that
context would lead to an incorrect error message.

Reopened #8481.

Change-Id: I49787fdf7738213370ae6f0cab54013e9e3394a8
Reviewed-on: https://go-review.googlesource.com/37876
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/typecheck.go
test/fixedbugs/issue8481.go [deleted file]
test/init.go