Files
carbon-lang/toolchain/check/testdata/packages/fail_api_not_found.carbon
T
Jon Ross-PerkinsandRichard Smith d024403dc4 Refactor checking flow to allow for ordering based on import/package. (#3379)
As I was working on this, I noticed `import` and `library` syntax needs
to be fixed for how it imports the current package, and for `Main`
libraries. This mostly reflects the current state in its testing.

Otherwise, this should handle most of the errors I could think of:
dependency cycles, redundant imports, etc.

It does not actually deal with the nuances of cross-IR references.

---------

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
2023-11-14 22:24:03 +00:00

30 lines
891 B
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
//
// AUTOUPDATE
// --- no_api.carbon
// CHECK:STDERR: no_api.carbon:[[@LINE+3]]:1: ERROR: Corresponding API not found.
// CHECK:STDERR: package Foo impl;
// CHECK:STDERR: ^
package Foo impl;
// --- no_api_lib.carbon
// CHECK:STDERR: no_api_lib.carbon:[[@LINE+3]]:1: ERROR: Corresponding API not found.
// CHECK:STDERR: package Foo library "Bar" impl;
// CHECK:STDERR: ^
package Foo library "Bar" impl;
// CHECK:STDOUT: file "no_api.carbon" {
// CHECK:STDOUT: }
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %.1: type = ptr_type String
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file "no_api_lib.carbon" {
// CHECK:STDOUT: %.loc5: String = string_literal "Bar"
// CHECK:STDOUT: }