commit | daafa522180923c2becd6fe1a507e04d904db77f | [log] [tgz] |
---|---|---|
author | Liam Miller-Cushon <cushon@google.com> | Tue Jul 20 13:11:19 2021 -0700 |
committer | Javac Team <javac-team+copybara@google.com> | Tue Jul 20 13:11:54 2021 -0700 |
tree | 2132e2277d197372d57378c61b9553a93b57633e | |
parent | be693b07c4beaa19d48d311d53dda023f40a71b5 [diff] |
Report diagnostics for type conversions When modeling primitive widening conversions, report diagnostics for invalid conversions instead of crashing. This rearranges the implementation to use switches on the primitive type kinds and casts instead of double-dispatch. The new approach makes it easier to access the position information needed to report a diagnostic, and also makes it more explicit which constants implement a particular conversion. PiperOrigin-RevId: 385854947