exp/types: resolve composite literal keys
The parser/resolver cannot accurately resolve
composite literal keys that are identifiers;
it needs type information.
Instead, try to resolve them but leave final
judgement to the type checker.
12 years, 7 months ago
(2012-12-28 18:40:19 UTC)
#4
https://codereview.appspot.com/6994047/diff/1003/src/pkg/exp/types/expr.go
File src/pkg/exp/types/expr.go (right):
https://codereview.appspot.com/6994047/diff/1003/src/pkg/exp/types/expr.go#ne...
src/pkg/exp/types/expr.go:510: // compositeLitKey resolves unresolved composite
literal keys.
On 2012/12/28 17:33:29, adonovan wrote:
> Might be good to add here:
>
> compositeLitKey resolves unresolved composite literal keys.
> Such references are always to declarations in the file, package or universe
> scope.
> For details...
Prefer to leave as is. There's a really long comment in the parser (as noted),
and the parser has really extensive comments about resolution.
Issue 6994047: code review 6994047: exp/types: resolve composite literal keys
(Closed)
Created 12 years, 7 months ago by gri
Modified 12 years, 7 months ago
Reviewers:
Base URL:
Comments: 2