]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/parser: don't crash after unexpected token
authorRobert Griesemer <gri@golang.org>
Mon, 13 Feb 2017 17:22:46 +0000 (09:22 -0800)
committerRobert Griesemer <gri@golang.org>
Mon, 13 Feb 2017 18:03:43 +0000 (18:03 +0000)
commitee2f5fafd88b5ce1404fa40e3645a409e9630897
tree5c982e43fb5ab21167121711625875d1b6d46d61
parent8da91a6297d5960b69ca22d764ef73906f6d61e9
cmd/compile/internal/parser: don't crash after unexpected token

Added missing nil-check. We will get rid of the gcCompat corrections
shortly but it's still worthwhile having the new test case added.

Fixes #19056.

Change-Id: I35bd938a4d789058da15724e34c05e5e631ecad0
Reviewed-on: https://go-review.googlesource.com/36908
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/syntax/parser.go
test/fixedbugs/issue19056.go [new file with mode: 0644]