• Josh Bleecher Snyder's avatar
    cmd/compile: fix isStaticCompositeLiteral · 3c6e60c0
    Josh Bleecher Snyder authored
    Previously, isStaticCompositeLiteral would
    return the wrong value for literals like:
    
    [1]struct{ b []byte }{b: []byte{1}}
    
    Note that the outermost component is an array,
    but once we recurse into isStaticCompositeLiteral,
    we never check again that arrays are actually arrays.
    
    Instead of adding more logic to the guts of
    isStaticCompositeLiteral, allow it to accept
    any Node and return the correct answer.
    
    Change-Id: I6af7814a9037bbc7043da9a96137fbee067bbe0e
    Reviewed-on: https://go-review.googlesource.com/22247Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    3c6e60c0
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...