carbon-language / carbon-lang

Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)
https://github.com/carbon-language/carbon-lang/blob/trunk/README.md
Other
32.31k stars 1.48k forks source link

Make representation of call to a generic class / interface more uniform. #4050

Closed zygoloid closed 2 weeks ago

zygoloid commented 2 weeks ago

Model such calls as call operations, and compute the resulting type in constant evaluation rather than in type-checking. This means we no longer form non-constant ClassType or InterfaceType values, and that we produce an <error> type in the case of bad argument lists rather than a broken / meaningless ClassType / InterfaceType that doesn't actually represent a type. This in turn suppresses some follow-on diagnostics.