• Rob Pike's avatar
    text/template/parse: fix data race · 20d9fd3a
    Rob Pike authored
    The situation only affects diagnostics but is easy to fix.
    When computing lineNumber, use the position of the last item
    returned by nextItem rather than the current state of the lexer.
    This is internal only and does not affect the API.
    
    Fixes #3886.
    
    R=golang-dev, iant
    CC=golang-dev
    https://golang.org/cl/6445061
    20d9fd3a
lex_test.go 7.46 KB