mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Remove trailing () from Core.*Literal and Core.Bool. (#7313)
We exposed `Core.IntLiteral()`, `Core.FloatLiteral()`, `Core.CharLiteral()`, and `Core.Bool()` as functions as a workaround, because we had no way to provide the type names without parentheses that the design requests. But now we can do so, by using an alias. Switch all of these over from being functions to simply being names of the corresponding types. Assisted-by: Gemini via Antigravity
This commit is contained in:
@@ -823,7 +823,7 @@ static auto IsLiteralType(const File& sem_ir, TypeId type_id) -> bool {
|
||||
// runtime value of such a type may not have a value available for the builtin
|
||||
// to use. For example, given:
|
||||
//
|
||||
// var n: Core.IntLiteral() = 123;
|
||||
// var n: Core.IntLiteral = 123;
|
||||
//
|
||||
// we would be unable to lower a runtime operation such as `(1 as i32) << n`
|
||||
// because the runtime representation of `n` doesn't track its value at all.
|
||||
|
||||
Reference in New Issue
Block a user