• Robert Griesemer's avatar
    spec: refine rules about terminating statements · b5ddbb90
    Robert Griesemer authored
    Per a suggestion from mdempsky.
    
    Both gc and gccgo consider a statement list as terminating if the
    last _non_empty_ statement is terminating; i.e., trailing semis are
    ok. Only gotype followed the current stricter rule in the spec.
    
    This change adjusts the spec to match gc and gccgo behavior. In
    support of this change, the spec has a matching rule for fallthrough,
    which in valid positions may be followed by trailing semis as well.
    
    For details and examples, see the issue below.
    
    Fixes #14422.
    
    Change-Id: Ie17c282e216fc40ecb54623445c17be111e17ade
    Reviewed-on: https://go-review.googlesource.com/19981Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    b5ddbb90
Name
Last commit
Last update
..
articles Loading commit data...
codewalk Loading commit data...
devel Loading commit data...
gopher Loading commit data...
play Loading commit data...
progs Loading commit data...
asm.html Loading commit data...
cmd.html Loading commit data...
code.html Loading commit data...
conduct.html Loading commit data...
contrib.html Loading commit data...
contribute.html Loading commit data...
debugging_with_gdb.html Loading commit data...
docs.html Loading commit data...
effective_go.html Loading commit data...
gccgo_contribute.html Loading commit data...
gccgo_install.html Loading commit data...
go-logo-black.png Loading commit data...
go-logo-blue.png Loading commit data...
go-logo-white.png Loading commit data...
go1.1.html Loading commit data...
go1.2.html Loading commit data...
go1.3.html Loading commit data...
go1.4.html Loading commit data...
go1.5.html Loading commit data...
go1.6.html Loading commit data...
go1.7.txt Loading commit data...
go1.html Loading commit data...
go1compat.html Loading commit data...
go_faq.html Loading commit data...
go_mem.html Loading commit data...
go_spec.html Loading commit data...
help.html Loading commit data...
ie.css Loading commit data...
install-source.html Loading commit data...
install.html Loading commit data...
root.html Loading commit data...
security.html Loading commit data...
share.png Loading commit data...
tos.html Loading commit data...