mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 20:20:10 +01:00
Adds min-preludes more tests which were seen as slow and their surrounding neighbours. This drops the file_test runtime on my machine from about 6s to about 4.5s. For a few files that are clearly only testing diagnostics, we drop the if-present semir ranges and the associated TODO.
30 lines
1.3 KiB
Plaintext
30 lines
1.3 KiB
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
|
|
//
|
|
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/fail_member_of_let.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/fail_member_of_let.carbon
|
|
|
|
class Class {
|
|
fn F() -> ();
|
|
}
|
|
|
|
// TODO: Use `:!` here once it is available.
|
|
let T: type = Class;
|
|
|
|
// The class name is required to be written in the same way as in the class
|
|
// declaration. An expression that evaluates to the class name is not accepted.
|
|
// CHECK:STDERR: fail_member_of_let.carbon:[[@LINE+7]]:4: error: name qualifiers are only allowed for entities that provide a scope [QualifiedNameInNonScope]
|
|
// CHECK:STDERR: fn T.F() {}
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR: fail_member_of_let.carbon:[[@LINE-7]]:5: note: referenced non-scope entity declared here [QualifiedNameNonScopeEntity]
|
|
// CHECK:STDERR: let T: type = Class;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
fn T.F() {}
|