You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MissingGenericFunctionDefinition error ends up being attached to test output far below where it is emitted if there are other errors below. It seems to always get sorted to last for some reason?
@zygoloid suggests we may want a custom sort key for the diagnostic.
fn C[T:! type](t: T);
fn F() {
C({});
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE+4]]:3: error: name `a` not found [NameNotFound]
// CHECK:STDERR: a;
// CHECK:STDERR: ^
// CHECK:STDERR:
a;
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE+11]]:3: error: name `b` not found [NameNotFound]
// CHECK:STDERR: b;
// CHECK:STDERR: ^
// CHECK:STDERR:
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-11]]:3: error: use of undefined generic function [MissingGenericFunctionDefinition]
// CHECK:STDERR: C({});
// CHECK:STDERR: ^
// CHECK:STDERR: fail_impl_cycle_one_generic_param.carbon:[[@LINE-17]]:1: note: generic function declared here [MissingGenericFunctionDefinitionHere]
// CHECK:STDERR: fn C[T:! type](t: T);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
b;
}
The text was updated successfully, but these errors were encountered:
This is because these issues are checked as part of CheckRequiredDefinitions. They would need to be given more specific last nodes in their diagnostic locations. As a reminder, this is a consequence of #4778.
Description of the bug:
The
MissingGenericFunctionDefinition
error ends up being attached to test output far below where it is emitted if there are other errors below. It seems to always get sorted to last for some reason?@zygoloid suggests we may want a custom sort key for the diagnostic.
The text was updated successfully, but these errors were encountered: