Skip to content

Commit ea648ab

Browse files
committed
fix a bug with nested custom modifiers
closes #271
1 parent 04196d5 commit ea648ab

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ Uiua is not yet stable.
55
<!-- This version is not yet released.
66
If you are reading this on the website, then these changes are live here. -->
77

8+
## 0.4.1 - 2023-11-30
9+
# Interpreter
10+
- Fix a bug with nested custom modifiers
11+
812
## 0.4.0 - 2023-11-30
913
### Language
1014
- [`windows` ``](https://uiua.org/docs/windows) can now take negative window sizes

src/compile.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,9 @@ impl Uiua {
627627
Signature::new(0, 1),
628628
)));
629629
}
630-
Global::Func { f, sig_declared } if call && !sig_declared => {
630+
Global::Func { f, sig_declared }
631+
if call && !sig_declared && count_temp_functions(&f.instrs) == 0 =>
632+
{
631633
self.extend_instrs(f.instrs.clone())
632634
}
633635
Global::Func { f, .. } => {

tests/units.ua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ ParseOrZero ← ⍣parse⋅⋅0
161161

162162
⍤⊃⋅∘≍ [⊙(+⊙(-⊙×)) 1 2 3 4 5] [⊙(+|-|×) 1 2 3 4 5]
163163

164+
F! ← ^1 5
165+
G! ← F!^1
166+
⍤⊃⋅∘≍ ¯5 G!¯
167+
164168
# Experimental!
165169
⍤⊃⋅∘≍ 120 ↬((|1 ×↫-1.|1)<2.) 5
166170
⍤⊃⋅∘≍ 8 ↬((+∩(|2 ↫ -)1,2|1)<2.) 5

0 commit comments

Comments
 (0)