1
0
mirror of https://github.com/golang/go synced 2024-11-18 21:54:49 -07:00

go/types: revert most recent change - we cannot rely on 1.5 features quite yet

Revert "go/types: fix Eval to use correct file set when evaluating an expression"

This reverts commit d241a1448b.

Change-Id: Ie16c57da2732d8b079108efef100fc956b71f737
Reviewed-on: https://go-review.googlesource.com/11010
Reviewed-by: David Symonds <dsymonds@golang.org>
This commit is contained in:
Robert Griesemer 2015-06-12 16:59:51 -07:00
parent d241a1448b
commit 136b4e419b

View File

@ -65,7 +65,11 @@ func Eval(fset *token.FileSet, pkg *Package, pos token.Pos, expr string) (tv Typ
}
// parse expressions
node, err := parser.ParseExprFrom(fset, "eval", expr, 0)
// BUG(gri) In case of type-checking errors below, the type checker
// doesn't have the correct file set for expr. The correct
// solution requires a ParseExpr that uses the incoming
// file set fset.
node, err := parser.ParseExpr(expr)
if err != nil {
return TypeAndValue{}, err
}