| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- // 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/interface/no_prelude/fail_todo_modifiers.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon
- interface Modifiers {
- // CHECK:STDERR: fail_todo_modifiers.carbon:[[@LINE+4]]:3: ERROR: Semantics TODO: `interface modifier`.
- // CHECK:STDERR: final fn Final() { }
- // CHECK:STDERR: ^~~~~
- // CHECK:STDERR:
- final fn Final() { }
- // CHECK:STDERR: fail_todo_modifiers.carbon:[[@LINE+3]]:3: ERROR: Semantics TODO: `interface modifier`.
- // CHECK:STDERR: default fn Default() { }
- // CHECK:STDERR: ^~~~~~~
- default fn Default() { }
- }
- // CHECK:STDOUT: --- fail_todo_modifiers.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %.1: type = interface_type @Modifiers [template]
- // CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic]
- // CHECK:STDOUT: %Final.type: type = fn_type @Final [template]
- // CHECK:STDOUT: %.2: type = tuple_type () [template]
- // CHECK:STDOUT: %Final: %Final.type = struct_value () [template]
- // CHECK:STDOUT: %.3: type = assoc_entity_type @Modifiers, %Final.type [template]
- // CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Modifiers.%Final.decl [template]
- // CHECK:STDOUT: %Default.type: type = fn_type @Default [template]
- // CHECK:STDOUT: %Default: %Default.type = struct_value () [template]
- // CHECK:STDOUT: %.5: type = assoc_entity_type @Modifiers, %Default.type [template]
- // CHECK:STDOUT: %.6: %.5 = assoc_entity element1, @Modifiers.%Default.decl [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Modifiers = %Modifiers.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Modifiers.decl: type = interface_decl @Modifiers [template = constants.%.1] {}
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @Modifiers {
- // CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self]
- // CHECK:STDOUT: %Final.decl: %Final.type = fn_decl @Final [template = constants.%Final] {}
- // CHECK:STDOUT: %.loc16: %.3 = assoc_entity element0, %Final.decl [template = constants.%.4]
- // CHECK:STDOUT: %Default.decl: %Default.type = fn_decl @Default [template = constants.%Default] {}
- // CHECK:STDOUT: %.loc20: %.5 = assoc_entity element1, %Default.decl [template = constants.%.6]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .Final = %.loc16
- // CHECK:STDOUT: .Default = %.loc20
- // CHECK:STDOUT: witness = (%Final.decl, %Default.decl)
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Final()
- // CHECK:STDOUT: generic [@Modifiers.%Self: %.1] {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Default()
- // CHECK:STDOUT: generic [@Modifiers.%Self: %.1] {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
|