Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1188)

Side by Side Diff: test/declbuiltin.dir/a.go

Issue 6856126: code review 6856126: cmd/gc: do not export useless private symbols. (Closed)
Patch Set: diff -r 6ec24fe2e501 https://go.googlecode.com/hg/ Created 11 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // A package that redeclares common builtin names.
6 package a
7
8 const true = 0 == 1
9 const false = 0 == 0
10 const nil = 1
11
12 func len(interface{}) int { return 42 }
13
14 func Test() {
lvd2 2012/12/03 22:40:30 shouldnt main.go run this one?
remyoudompheng 2012/12/06 07:23:55 Done.
15 var array [nil]int
16 if true {
17 panic("unexpected builtin true instead of redeclared one")
18 }
19 if !false {
20 panic("unexpected builtin false instead of redeclared one")
21 }
22 if len(array) != 42 {
23 println(len(array))
24 panic("unexpected call of builtin len")
25 }
26 }
27
28 func InlinedFakeTrue() bool { return true }
29 func InlinedFakeFalse() bool { return false }
30 func InlinedFakeNil() interface{} { return nil }
OLDNEW
« src/cmd/gc/lex.c ('K') | « test/declbuiltin.go ('k') | test/declbuiltin.dir/main.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b