mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 07:41:03 +01:00
Sink comment into implementation (#4833)
This comment applies equally to any called passing `check_syntax=false`, such as for virtual function impls, being tested in #4816
This commit is contained in:
@@ -14,6 +14,12 @@ auto CheckFunctionTypeMatches(Context& context,
|
||||
const SemIR::Function& prev_function,
|
||||
SemIR::SpecificId prev_specific_id,
|
||||
bool check_syntax) -> bool {
|
||||
// TODO: When check_syntax is false, the functions should be allowed to have
|
||||
// different signatures as long as we can synthesize a suitable thunk. i.e.,
|
||||
// when there's an implicit conversion from the original parameter types to
|
||||
// the overriding parameter types, and from the overriding return type to the
|
||||
// original return type.
|
||||
// Also, build that thunk.
|
||||
if (!CheckRedeclParamsMatch(context, DeclParams(new_function),
|
||||
DeclParams(prev_function), prev_specific_id,
|
||||
check_syntax)) {
|
||||
|
||||
Reference in New Issue
Block a user