Commit 4ed7c59a authored by Robert Griesemer's avatar Robert Griesemer

fix build (this time for real): adjust typechecker test, ogle

R=r, r2
CC=golang-dev
https://golang.org/cl/4006041
parent 8b410556
......@@ -64,7 +64,8 @@ func Main() {
func newScanner(input []byte) (*scanner.Scanner, *scanner.ErrorVector) {
sc := new(scanner.Scanner)
ev := new(scanner.ErrorVector)
sc.Init(fset, "input", input, ev, 0)
file := fset.AddFile("input", fset.Base(), len(input))
sc.Init(file, input, ev, 0)
return sc, ev
}
......
......@@ -68,7 +68,8 @@ func expectedErrors(t *testing.T, pkg *ast.Package) (list scanner.ErrorList) {
}
var s scanner.Scanner
s.Init(fset, filename, src, nil, scanner.ScanComments)
file := fset.AddFile(filename, fset.Base(), len(src))
s.Init(file, src, nil, scanner.ScanComments)
var prev token.Pos // position of last non-comment token
loop:
for {
......
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