Skip to content

Update usage of CppInterOp API - #168

Merged
Vipul-Cariappa merged 2 commits into
compiler-research:mainfrom
Vipul-Cariappa:update/BestOverloadFunctionMatch
Oct 28, 2026
Merged

Vipul-Cariappa merged 2 commits into
compiler-research:mainfrom
Vipul-Cariappa:update/BestOverloadFunctionMatch

Conversation

@Vipul-Cariappa

@Vipul-Cariappa Vipul-Cariappa commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

According to compiler-research/CppInterOp#1147

With this change, the user will not be able to call a templated static function from the object.
For example:

struct A {
static void foo(int) {};
template <typename T>
static void bar(T t) {};
};
gbl.A().foo(1) # good
gbl.A.foo(1)   # good
gbl.A().bar(1) # bad
gbl.A.bar(1)   # good

FYI, I expect the tests to fail as the CppInterOp PR is not yet merged.

@aaronj0

aaronj0 commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

FYI, I expect the tests to fail as the CppInterOp PR is not yet merged.

You can stack this PR on top of the CppInterOp one for CI feedback. Template example: cc7edf7 with your remote and branch

I'll update the CI to LLVM 23 shortly

@Vipul-Cariappa
Vipul-Cariappa force-pushed the update/BestOverloadFunctionMatch branch from 1564c5f to b7e3017 Compare October 23, 2026 15:06
vgvassilev
vgvassilev previously approved these changes Oct 28, 2026

@vgvassilev vgvassilev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm % comments.

Comment thread CMakeLists.txt Outdated
According to compiler-research/CppInterOp#1147

With this change, the user will not be able to call templated static
function from the object.
For example:
```c++
struct A {
static void foo(int) {};
template <typename T>
static void bar(T t) {};
};
```
```python
gbl.A().foo(1) # good
gbl.A.foo(1)   # good
gbl.A().bar(1) # bad
gbl.A.bar(1)   # good
```

@vgvassilev vgvassilev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Vipul-Cariappa
Vipul-Cariappa merged commit 8a20f95 into compiler-research:main Oct 28, 2026
25 checks passed
@Vipul-Cariappa
Vipul-Cariappa deleted the update/BestOverloadFunctionMatch branch October 28, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants