From 4cf7711568da9510bae09338e03a66049767c851 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 30 Jan 2009 14:39:31 -0800 Subject: update go code tree to new func rules. R=r DELTA=367 (111 added, 59 deleted, 197 changed) OCL=23957 CL=23960 --- test/func4.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/func4.go (limited to 'test/func4.go') diff --git a/test/func4.go b/test/func4.go new file mode 100644 index 0000000000..843e6d341b --- /dev/null +++ b/test/func4.go @@ -0,0 +1,14 @@ +// errchk $G $D/$F.go + +// Copyright 2009 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 + +var notmain func() + +func main() { + var x = &main; // ERROR "address of function" + main = notmain; // ERROR "assign to function" +} -- cgit v1.2.1