mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 19:51:09 +01:00
Add a `NameId` that is effectively just a wrapper around a `StringId`, with some additional predefined values for names that don't correspond to strings, such as the name of `self` or the function's return slot.
21 lines
805 B
Plaintext
21 lines
805 B
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// AUTOUPDATE
|
|
|
|
var x: i32;
|
|
// CHECK:STDERR: fail_qualifier_unsupported.carbon:[[@LINE+3]]:15: ERROR: Type `i32` does not support qualified expressions.
|
|
// CHECK:STDERR: var y: i32 = x.b;
|
|
// CHECK:STDERR: ^
|
|
var y: i32 = x.b;
|
|
|
|
// CHECK:STDOUT: file "fail_qualifier_unsupported.carbon" {
|
|
// CHECK:STDOUT: %x.var: ref i32 = var x
|
|
// CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var
|
|
// CHECK:STDOUT: %y.var: ref i32 = var y
|
|
// CHECK:STDOUT: %y: ref i32 = bind_name y, %y.var
|
|
// CHECK:STDOUT: %x.ref: ref i32 = name_reference x, %x
|
|
// CHECK:STDOUT: assign %y.var, <error>
|
|
// CHECK:STDOUT: }
|