changes LookupCppImpl's return to handle multiple associated entities (#6916)

`LookupCppImpl` handles exactly one function ID, so core interfaces with
multiple associated entities were regarded as unsupported. This commit
adds support for a single associated function with a single associated
constant.

Note: associated constants are still TODO.

---------

Co-authored-by: Dana Jansens <danakj@orodu.net>
This commit is contained in:
Christopher Di Bella
2026-03-19 22:03:39 +00:00
committed by GitHub
co-authored by Dana Jansens
parent 08148f3a3a
commit fd2d210c63
2 changed files with 41 additions and 21 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ public:
''';
fn TestDerefPass(var int_ptr: Cpp.ConstDeref) -> ref i32 {
// CHECK:STDERR: fail_todo_const_deref.carbon:[[@LINE+4]]:10: error: semantics TODO: `Unsupported definition of interface CppUnsafeDeref` [SemanticsTodo]
// CHECK:STDERR: fail_todo_const_deref.carbon:[[@LINE+4]]:10: error: semantics TODO: `Associated constant in interface with synthesized impl` [SemanticsTodo]
// CHECK:STDERR: return int_ptr.(Core.CppUnsafeDeref.Op)();
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
@@ -43,7 +43,7 @@ public:
''';
fn TestDerefPass(var int_ptr: Cpp.MutableDeref) -> ref i32 {
// CHECK:STDERR: fail_todo_mutable_deref.carbon:[[@LINE+4]]:10: error: semantics TODO: `Unsupported definition of interface CppUnsafeDeref` [SemanticsTodo]
// CHECK:STDERR: fail_todo_mutable_deref.carbon:[[@LINE+4]]:10: error: semantics TODO: `Associated constant in interface with synthesized impl` [SemanticsTodo]
// CHECK:STDERR: return int_ptr.(Core.CppUnsafeDeref.Op)();
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: