Files
carbon-lang/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon
T
Jon Ross-Perkins aa5bfa564f Add a distinct semir file separator. (#3438)
This removes the filename from the file-scoped block, and places it
above to make it clear where the full SemIR begins (with multifile,
providing a barrier between).
2023-12-01 00:53:45 +00:00

24 lines
852 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: --- fail_qualifier_unsupported.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// 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_ref x, %x
// CHECK:STDOUT: assign %y.var, <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: