|
2 | 2 | // Exceptions. See /LICENSE for license information. |
3 | 3 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
4 | 4 | // |
| 5 | +// EXTRA-ARGS: --no-dump-sem-ir |
| 6 | +// |
5 | 7 | // AUTOUPDATE |
6 | 8 | // TIP: To test this file alone, run: |
7 | 9 | // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon |
8 | 10 | // TIP: To dump output, run: |
9 | 11 | // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon |
10 | 12 |
|
11 | 13 | interface I { |
12 | | - // CHECK:STDERR: fail_assoc_const_not_constant.carbon:[[@LINE+8]]:10: error: `Core.Int` implicitly referenced here, but package `Core` not found [CoreNotFound] |
13 | | - // CHECK:STDERR: let a: i32; |
14 | | - // CHECK:STDERR: ^~~ |
15 | | - // CHECK:STDERR: |
16 | 14 | // CHECK:STDERR: fail_assoc_const_not_constant.carbon:[[@LINE+4]]:7: error: pattern in associated constant declaration must be a single `:!` binding [ExpectedSymbolicBindingInAssociatedConstant] |
17 | | - // CHECK:STDERR: let a: i32; |
| 15 | + // CHECK:STDERR: let a: {.b: ()}; |
18 | 16 | // CHECK:STDERR: ^ |
19 | 17 | // CHECK:STDERR: |
20 | | - let a: i32; |
| 18 | + let a: {.b: ()}; |
21 | 19 | } |
22 | 20 |
|
23 | 21 | // We shouldn't issue further errors on uses of the invalid name. |
24 | 22 | alias UseA = I.a; |
25 | 23 |
|
26 | 24 | // Ideally we would still diagnose this, but it's OK that we don't. |
27 | 25 | alias UseOther = I.other; |
28 | | - |
29 | | -// CHECK:STDOUT: --- fail_assoc_const_not_constant.carbon |
30 | | -// CHECK:STDOUT: |
31 | | -// CHECK:STDOUT: constants { |
32 | | -// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] |
33 | | -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] |
34 | | -// CHECK:STDOUT: } |
35 | | -// CHECK:STDOUT: |
36 | | -// CHECK:STDOUT: file { |
37 | | -// CHECK:STDOUT: package: <namespace> = namespace [concrete] { |
38 | | -// CHECK:STDOUT: .I = %I.decl |
39 | | -// CHECK:STDOUT: .UseA = %UseA |
40 | | -// CHECK:STDOUT: .UseOther = %UseOther |
41 | | -// CHECK:STDOUT: } |
42 | | -// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} |
43 | | -// CHECK:STDOUT: %I.ref.loc24: type = name_ref I, %I.decl [concrete = constants.%I.type] |
44 | | -// CHECK:STDOUT: %a.ref: <error> = name_ref a, <unexpected>.inst19.loc20_7 [concrete = <error>] |
45 | | -// CHECK:STDOUT: %UseA: <error> = bind_alias UseA, <unexpected>.inst19.loc20_7 [concrete = <error>] |
46 | | -// CHECK:STDOUT: %I.ref.loc27: type = name_ref I, %I.decl [concrete = constants.%I.type] |
47 | | -// CHECK:STDOUT: %other.ref: <error> = name_ref other, <error> [concrete = <error>] |
48 | | -// CHECK:STDOUT: %UseOther: <error> = bind_alias UseOther, <error> [concrete = <error>] |
49 | | -// CHECK:STDOUT: } |
50 | | -// CHECK:STDOUT: |
51 | | -// CHECK:STDOUT: interface @I { |
52 | | -// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] |
53 | | -// CHECK:STDOUT: |
54 | | -// CHECK:STDOUT: !members: |
55 | | -// CHECK:STDOUT: .Self = %Self |
56 | | -// CHECK:STDOUT: .a = <unexpected>.inst19.loc20_7 |
57 | | -// CHECK:STDOUT: .other = <poisoned> |
58 | | -// CHECK:STDOUT: has_error |
59 | | -// CHECK:STDOUT: witness = () |
60 | | -// CHECK:STDOUT: } |
61 | | -// CHECK:STDOUT: |
0 commit comments