mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 19:20:13 +01:00
Split up the CppRange interface into smaller parts, with the intent of improving the diagnostic quality and making the implementation easier to understand. This also makes the implementation details of the CppRange machinery private, which breaks one of the existing tests; that test is split into two files, one which tests the low-level machinery works, and another that tests the resulting prelude behavior. This change exposes a crash in `where` expression handling, where we would perform a substitution that creates a new `SpecificConstant` that refers into a region of a generic that has never been resolved. Fix that by resolving the definition region of a generic if eval sees a `SpecificConstant` that refers into it. This is usually not necessary because something else should have resolved that region first, but that doesn't happen here. --------- Co-authored-by: Dana Jansens <danakj@orodu.net>