Skip to content

🅾️ typechecker#79

Merged
timfennis merged 38 commits intomasterfrom
feature/typecheck
Feb 24, 2026
Merged

🅾️ typechecker#79
timfennis merged 38 commits intomasterfrom
feature/typecheck

Conversation

@timfennis
Copy link
Owner

No description provided.

Element-wise operations now work on numeric tuples:
- (1,2) + (5,3) == (6,5)
- (1,1) * 2 == (2,2)
- 5 + (3,2) == (8,7)

The analyser's last-resort fallback now collects all same-named
bindings instead of just the last one, so operators like `-` with
both unary and binary overloads can be correctly resolved at runtime.
The evaluator's resolve_and_call attempts vectorization when no direct
function match is found and the argument types support it.
Pre-register named functions with a placeholder type before analysing
their body, so recursive calls to the same function resolve correctly.
After body analysis the placeholder is updated with the actual type.
Also add ScopeTree::update_binding_type for this purpose.
@timfennis timfennis marked this pull request as ready for review February 24, 2026 10:39
@timfennis timfennis merged commit a150622 into master Feb 24, 2026
1 check passed
@timfennis timfennis deleted the feature/typecheck branch February 24, 2026 11:25
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.

1 participant