Commit d5b570cd authored by Robert Griesemer's avatar Robert Griesemer

fix build: use temporary variable to avoid compiler error

R=r
CC=golang-dev
https://golang.org/cl/6612066
parent 0d947420
...@@ -169,7 +169,10 @@ func TestExprs(t *testing.T) { ...@@ -169,7 +169,10 @@ func TestExprs(t *testing.T) {
t.Errorf("%s: %s", src, err) t.Errorf("%s: %s", src, err)
continue continue
} }
expr := pkg.Files[filename].Decls[0].(*ast.GenDecl).Specs[0].(*ast.ValueSpec).Values[0] // TODO(gri) writing the code below w/o the decl variable will
// cause a 386 compiler error (out of fixed registers)
decl := pkg.Files[filename].Decls[0].(*ast.GenDecl)
expr := decl.Specs[0].(*ast.ValueSpec).Values[0]
str := exprString(expr) str := exprString(expr)
if str != test.str { if str != test.str {
t.Errorf("%s: got %s, want %s", test.src, str, test.str) t.Errorf("%s: got %s, want %s", test.src, str, test.str)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment