From d5b570cdb105d8ea3c6a86c603949d3a9de647f3 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Sun, 7 Oct 2012 18:16:04 -0700 Subject: [PATCH] fix build: use temporary variable to avoid compiler error R=r CC=golang-dev https://golang.org/cl/6612066 --- src/pkg/exp/types/staging/types_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pkg/exp/types/staging/types_test.go b/src/pkg/exp/types/staging/types_test.go index d6ddfabc31..e6959bceeb 100644 --- a/src/pkg/exp/types/staging/types_test.go +++ b/src/pkg/exp/types/staging/types_test.go @@ -169,7 +169,10 @@ func TestExprs(t *testing.T) { t.Errorf("%s: %s", src, err) 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) if str != test.str { t.Errorf("%s: got %s, want %s", test.src, str, test.str) -- 2.48.1