Skip to content

Expose method const-qualification in func_overloads_types - #1

Merged
conrade-ctc merged 1 commit into
ctc-masterfrom
rathorey/func-overloads-is-const
Aug 31, 2026
Merged

Expose method const-qualification in func_overloads_types#1
conrade-ctc merged 1 commit into
ctc-masterfrom
rathorey/func-overloads-is-const

Conversation

@rathorey-ctc

@rathorey-ctc rathorey-ctc commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Adds a per-overload is_const field to the func_overloads_types metadata dict
(cpyrt::CPPMethod::GetSignatureTypes), routed through the existing
interop::IsConstMethod chain. Always False for free functions and static
methods. Additive — return_type/input_types unchanged; consumers read keys
individually.

Motivation: a downstream consumer needs to classify reflected methods as const
vs non-const for validation; constness was previously not recoverable from
Python.

Intended release: ctc.34.

Test evidence:

  • Red→green test17_func_overloads_types_reports_constness in
    test/test_overloads.py (red at the base branch: KeyError: 'is_const').
  • Repo test suite green locally.

@rathorey-ctc
rathorey-ctc force-pushed the rathorey/func-overloads-is-const branch from f7c8c03 to 58c8b22 Compare August 31, 2026 16:28
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

Test Results

Configuration Result
macos-26-intel-llvm21-py3.14-cxx20 = 442 passed, 46 skipped, 85 xfailed, 32 xpassed, 100 warnings in 94.27s (0:01:34) =
macos-26-llvm21-py3.14-cxx20 ==== 443 passed, 39 skipped, 93 xfailed, 30 xpassed, 100 warnings in 45.76s ====
ubuntu-24.04-llvm21-py3.14-cxx20-vg ====== 559 passed, 26 skipped, 18 xfailed, 2 xpassed in 86.32s (0:01:26) =======
ubuntu-24.04-llvm22-py3.14-cxx20 test_regression.py s................................x................
ubuntu-24.04-llvm22-py3.14-cxx20-cling = 1 failed, 548 passed, 26 skipped, 27 xfailed, 3 xpassed in 102.63s (0:01:42) =
ubuntu-24.04-llvm22-py3.14-cxx23 test_regression.py s................................x................

* [cpyrt] Add per-overload 'is_const' to GetSignatureTypes
* [test] Add regression test for overload constness reporting

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@rathorey-ctc
rathorey-ctc force-pushed the rathorey/func-overloads-is-const branch from 58c8b22 to 18f6be1 Compare August 31, 2026 19:54
@conrade-ctc conrade-ctc self-assigned this Aug 31, 2026
@conrade-ctc
conrade-ctc merged commit 6d7fa97 into ctc-master Aug 31, 2026
6 of 9 checks passed
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