• Tal Shprecher's avatar
    cmd/compile: make enqueued map keys fail validation on forward types · 24967ec1
    Tal Shprecher authored
    Map keys are currently validated in multiple locations but share
    a common validation routine. The problem is that early validations
    should be lenient enough to allow for forward types while the final
    validations should not. The final validations should fail on forward
    types since they've already settled.
    
    This change also separates the key type checking from the creation
    of the map via typMap. Instead of the mapqueue being populated in
    copytype() by checking the map line number, it's populated in the
    same block that validates the key type. This isolates key validation
    logic while type checking.
    
    Fixes #14988
    
    Change-Id: Ia47cf6213585d6c63b3a35249104c0439feae658
    Reviewed-on: https://go-review.googlesource.com/21830Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    24967ec1
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vet Loading commit data...
yacc Loading commit data...