mirror of
https://github.com/golang/go
synced 2024-11-25 00:28:00 -07:00
fix build (this time for real): adjust typechecker test, ogle
R=r, r2 CC=golang-dev https://golang.org/cl/4006041
This commit is contained in:
parent
8b41055656
commit
4ed7c59a50
@ -64,7 +64,8 @@ func Main() {
|
|||||||
func newScanner(input []byte) (*scanner.Scanner, *scanner.ErrorVector) {
|
func newScanner(input []byte) (*scanner.Scanner, *scanner.ErrorVector) {
|
||||||
sc := new(scanner.Scanner)
|
sc := new(scanner.Scanner)
|
||||||
ev := new(scanner.ErrorVector)
|
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
|
return sc, ev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,8 @@ func expectedErrors(t *testing.T, pkg *ast.Package) (list scanner.ErrorList) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var s scanner.Scanner
|
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
|
var prev token.Pos // position of last non-comment token
|
||||||
loop:
|
loop:
|
||||||
for {
|
for {
|
||||||
|
Loading…
Reference in New Issue
Block a user