diff options
| author | Robert Griesemer <gri@golang.org> | 2010-02-24 13:24:37 -0800 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2010-02-24 13:24:37 -0800 |
| commit | 25df35f2c7eda611664834fa15d158482d800de4 (patch) | |
| tree | e81ca00f610f3f60e00d1914af60ee6f1c5ad714 /src/pkg/exp/eval/expr.go | |
| parent | 06b944d91954aaef6043546899972ad81feca159 (diff) | |
| download | golang-25df35f2c7eda611664834fa15d158482d800de4.tar.gz | |
gofmt: don't print ()'s around function-typed results (not needed anymore)
- add extra test cases to go/printer tests
- apply gofmt to src and misc
R=rsc
CC=golang-dev
http://codereview.appspot.com/223041
Diffstat (limited to 'src/pkg/exp/eval/expr.go')
| -rw-r--r-- | src/pkg/exp/eval/expr.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/exp/eval/expr.go b/src/pkg/exp/eval/expr.go index 94714943c..f875bb005 100644 --- a/src/pkg/exp/eval/expr.go +++ b/src/pkg/exp/eval/expr.go @@ -303,7 +303,7 @@ func (a *assignCompiler) allowMapForms(nls int) { // a function that expects an l-value and the frame in which to // evaluate the RHS expressions. The l-value must have exactly the // type given by lt. Returns nil if type checking fails. -func (a *assignCompiler) compile(b *block, lt Type) (func(Value, *Thread)) { +func (a *assignCompiler) compile(b *block, lt Type) func(Value, *Thread) { lmt, isMT := lt.(*MultiType) rmt, isUnpack := a.rmt, a.isUnpack @@ -446,7 +446,7 @@ func (a *assignCompiler) compile(b *block, lt Type) (func(Value, *Thread)) { // compileAssign compiles an assignment operation without the full // generality of an assignCompiler. See assignCompiler for a // description of the arguments. -func (a *compiler) compileAssign(pos token.Position, b *block, lt Type, rs []*expr, errOp, errPosName string) (func(Value, *Thread)) { +func (a *compiler) compileAssign(pos token.Position, b *block, lt Type, rs []*expr, errOp, errPosName string) func(Value, *Thread) { ac, ok := a.checkAssign(pos, rs, errOp, errPosName) if !ok { return nil @@ -836,8 +836,8 @@ func (a *exprInfo) compileSelectorExpr(v *expr, name string) *expr { // TODO(austin) Now that the expression compiler works on // semantic values instead of AST's, there should be a much // better way of doing this. - var find func(Type, int, string) (func(*expr) *expr) - find = func(t Type, depth int, pathName string) (func(*expr) *expr) { + var find func(Type, int, string) func(*expr) *expr + find = func(t Type, depth int, pathName string) func(*expr) *expr { // Don't bother looking if we've found something shallower if bestDepth != -1 && bestDepth < depth { return nil |
