diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-28 13:36:16 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-28 13:36:16 +0000 |
| commit | b28384fed1ce638e8b00b72dba974e9fd7e55eb4 (patch) | |
| tree | b0b342b148c1d5b33197f7a59d0a7a7edb92af1c /include/cps/FunctionGen.h | |
| parent | caa88a9b36d9e1dfae40ecb31aee05bc2891fa17 (diff) | |
feat(overload): support default return types
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps/FunctionGen.h')
| -rw-r--r-- | include/cps/FunctionGen.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/cps/FunctionGen.h b/include/cps/FunctionGen.h index c3c530b..5e895fe 100644 --- a/include/cps/FunctionGen.h +++ b/include/cps/FunctionGen.h @@ -42,6 +42,7 @@ struct FuncSig { std::string ParamKey; std::string ReturnKey; bool IsOverload = false; + bool IsDefaultReturn = false; const PrototypeAST *Prototype = nullptr; std::string ReturnTypeName; std::vector<ParamSig> Params; @@ -122,6 +123,7 @@ public: void setVisibility(std::function<bool(size_t)> Predicate) { Visible = std::move(Predicate); } std::vector<const FuncSig *> getOverloads(const std::string &Name, bool AllUnits = false) const; static bool isReservedRuntimeName(const std::string &Name); + static const FuncSig *selectDefaultReturn(const std::vector<const FuncSig *> &Candidates); bool hasFunction(const std::string &Name) const { return !getOverloads(Name).empty(); } const FuncSig *getSignatureByLink(const std::string &Name) const; |
