| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- // 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/packages/fail_name_with_import_failure.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/packages/fail_name_with_import_failure.carbon
- // --- fail_implicit.impl.carbon
- // CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+3]]:6: error: corresponding API for 'Implicit' not found [LibraryApiNotFound]
- // CHECK:STDERR: impl package Implicit;
- // CHECK:STDERR: ^~~~~~~
- impl package Implicit;
- var a: () = A();
- // CHECK:STDOUT: --- fail_implicit.impl.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .a = %a
- // CHECK:STDOUT: has_error
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import = import <invalid>
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a
- // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @__global_init() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %A.ref: <error> = name_ref A, <error> [template = <error>]
- // CHECK:STDOUT: assign file.%a.var, <error>
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
|