Clarify what specific name in the Core package is looked for when diagnosing that the Core package is not found (#4571)

I believe this makes the error easier to understand.
This commit is contained in:
Boaz Brickner
2024-11-22 15:48:18 +00:00
committed by GitHub
parent d870e0bd7c
commit bbd8b55be2
12 changed files with 19 additions and 17 deletions
@@ -13,7 +13,7 @@ interface I {
// CHECK:STDERR: let a: i32;
// CHECK:STDERR: ^
// CHECK:STDERR:
// CHECK:STDERR: fail_assoc_const_not_constant.carbon:[[@LINE+3]]:10: error: package `Core` implicitly referenced here, but not found [CoreNotFound]
// CHECK:STDERR: fail_assoc_const_not_constant.carbon:[[@LINE+3]]:10: error: `Core.Int` implicitly referenced here, but package `Core` not found [CoreNotFound]
// CHECK:STDERR: let a: i32;
// CHECK:STDERR: ^~~
let a: i32;
@@ -21,7 +21,7 @@ fn F() {
// CHECK:STDERR:
Interface.F();
// CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+3]]:10: error: package `Core` implicitly referenced here, but not found [CoreNotFound]
// CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+3]]:10: error: `Core.ImplicitAs` implicitly referenced here, but package `Core` not found [CoreNotFound]
// CHECK:STDERR: var v: Interface.T;
// CHECK:STDERR: ^~~~~~~~~~~
var v: Interface.T;
@@ -49,7 +49,7 @@ class B {}
fn F(T:! Generic(A));
fn G(T:! Generic(B)) {
// TODO: Include generic arguments in the type name.
// CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE+6]]:3: error: package `Core` implicitly referenced here, but not found [CoreNotFound]
// CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE+6]]:3: error: `Core.ImplicitAs` implicitly referenced here, but package `Core` not found [CoreNotFound]
// CHECK:STDERR: F(T);
// CHECK:STDERR: ^~
// CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]