commit | 70cf67704699c8bcaf6f52437812367cdc4ad169 | [log] [tgz] |
---|---|---|
author | Cherry Zhang <cherryyz@google.com> | Mon Sep 11 13:51:45 2017 -0400 |
committer | Ian Lance Taylor <iant@golang.org> | Fri Sep 15 21:24:39 2017 +0000 |
tree | da84f5dfe309879d8327fee5620e3fb550184a4e | |
parent | de7b370901c4fc6852eaa7372282bb699429ec4a [diff] |
compiler: call error_statement for fallthrough in last case It is possible to do this check in backend, by walking the block and check whether the last statement is a goto. But it seems easier to do it in the frontend, where it can simply use is_fallthrough. Change-Id: Icd61c52c96a408f7e00566cb7b232848cd449e25 Reviewed-on: https://go-review.googlesource.com/63690 Reviewed-by: Ian Lance Taylor <iant@golang.org>