mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-18 20:50:29 +00:00
teaches arithmetic interfaces about C++ operators (#7123)
This commit is contained in:
1 parent
aa8f9d8c00
commit
9480c10ecf
11 files changed
+4160
-45
No files matched your search
@@ -250,6 +250,10 @@ auto CheckFunctionReturnTypeMatches(Context& context,
|
||||
}
|
||||
if (!context.types().AreEqualAcrossDeclarations(new_return_type_id,
|
||||
prev_return_type_id)) {
|
||||
if (new_function.name_id == SemIR::NameId::CppOperator &&
|
||||
!prev_return_type_id.has_value()) {
|
||||
return true;
|
||||
}
|
||||
if (!diagnose) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user