mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Reimplement derived class thunk in terms of down-casting (#7322)
This helps us move away from the clone-with-modifications approach to thunking, which gets unwieldy as signatures get more complex. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
1a26b57732
commit
85c53fa00c
@@ -304,12 +304,10 @@ auto CheckFunctionTypeMatches(Context& context,
|
||||
const SemIR::Function& new_function,
|
||||
const SemIR::Function& prev_function,
|
||||
SemIR::SpecificId prev_specific_id,
|
||||
bool check_syntax,
|
||||
SemIR::TypeId self_type_override_id,
|
||||
bool diagnose) -> bool {
|
||||
bool check_syntax, bool diagnose) -> bool {
|
||||
if (!CheckRedeclParamsMatch(context, DeclParams(new_function),
|
||||
DeclParams(prev_function), prev_specific_id,
|
||||
diagnose, check_syntax, self_type_override_id)) {
|
||||
diagnose, check_syntax)) {
|
||||
return false;
|
||||
}
|
||||
if (!CheckFunctionReturnTypeMatches(context, new_function, prev_function,
|
||||
|
||||
Reference in New Issue
Block a user