-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously this was ignored, and then #4720 accidentally made it a crash bug
- Loading branch information
1 parent
e79d3be
commit 55714dd
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
toolchain/check/testdata/var/no_prelude/fail_in_interface.carbon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// 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 | ||
// TIP: To test this file alone, run: | ||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/var/no_prelude/fail_in_interface.carbon | ||
// TIP: To dump output, run: | ||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/var/no_prelude/fail_in_interface.carbon | ||
|
||
interface I { | ||
// CHECK:STDERR: fail_in_interface.carbon:[[@LINE+4]]:3: error: `var` declaration in interface [VarInInterfaceDecl] | ||
// CHECK:STDERR: var v: (); | ||
// CHECK:STDERR: ^~~~~~~~~~ | ||
// CHECK:STDERR: | ||
var v: (); | ||
} | ||
|
||
// CHECK:STDOUT: --- fail_in_interface.carbon | ||
// CHECK:STDOUT: | ||
// CHECK:STDOUT: constants { | ||
// CHECK:STDOUT: %I.type: type = facet_type <@I> [template] | ||
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] | ||
// CHECK:STDOUT: } | ||
// CHECK:STDOUT: | ||
// CHECK:STDOUT: file { | ||
// CHECK:STDOUT: package: <namespace> = namespace [template] { | ||
// CHECK:STDOUT: .I = %I.decl | ||
// CHECK:STDOUT: } | ||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} | ||
// CHECK:STDOUT: } | ||
// CHECK:STDOUT: | ||
// CHECK:STDOUT: interface @I { | ||
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] | ||
// CHECK:STDOUT: | ||
// CHECK:STDOUT: !members: | ||
// CHECK:STDOUT: .Self = %Self | ||
// CHECK:STDOUT: .v = <unexpected>.inst20.loc16_7 | ||
// CHECK:STDOUT: witness = () | ||
// CHECK:STDOUT: } | ||
// CHECK:STDOUT: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters