Descriptiongo/types: fix type-checking of shift expressions
Completely rethought shift expression type checking.
Instead of attempting to type-check them eagerly, now
delay the checking of untyped constant lhs in non-
constant shifts until the final expression type
becomes clear. Once it is clear, update the respective
expression tree with the final (not untyped) type and
check respective shift lhs' where necessary.
This also cleans up another conundrum: How to report
the type of untyped constants as it changes from
untyped to typed. Now, Context.Expr is only called
for an expresion x once x has received its final
(not untyped) type (for constant initializers, the
final type may still be untyped).
With this CL all remaining std lib packages that
did not typecheck due to shift errors pass now.
TODO: There's a lot of residual stuff that needs
to be cleaned up but with this CL all tests pass
now.
Patch Set 1 #Patch Set 2 : diff -r 82796ae901bb https://code.google.com/p/go #Patch Set 3 : diff -r 1e891021e069 https://code.google.com/p/go #Patch Set 4 : diff -r 2bf8d07c14c1 https://code.google.com/p/go #Patch Set 5 : diff -r ab7c5976cb19 https://code.google.com/p/go #Patch Set 6 : diff -r ab7c5976cb19 https://code.google.com/p/go #Patch Set 7 : diff -r c3733f9d8642 https://code.google.com/p/go #Patch Set 8 : diff -r 38b1893be35d https://code.google.com/p/go #Patch Set 9 : diff -r 38b1893be35d https://code.google.com/p/go #Patch Set 10 : diff -r 38b1893be35d https://code.google.com/p/go #
Total comments: 13
Patch Set 11 : diff -r 3e3f5a31adaf https://code.google.com/p/go #Patch Set 12 : diff -r 86983e7002df https://code.google.com/p/go #Patch Set 13 : diff -r 4cdeb75811c7 https://code.google.com/p/go #Patch Set 14 : diff -r 4cdeb75811c7 https://code.google.com/p/go #
MessagesTotal messages: 7
|