From: Robert Griesemer Date: Mon, 8 Oct 2012 01:16:04 +0000 (-0700) Subject: fix build: use temporary variable to avoid compiler error X-Git-Tag: go1.1rc2~2194 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d5b570cdb105d8ea3c6a86c603949d3a9de647f3;p=gostls13.git fix build: use temporary variable to avoid compiler error R=r CC=golang-dev https://golang.org/cl/6612066 --- 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)