Skip to content

Commit 583866b

Browse files
committed
FIX: word binding inside maps when construction syntax is used
resolves: Oldes/Rebol-issues#2593
1 parent 9a90e20 commit 583866b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/core/c-frame.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@
838838
}
839839
}
840840
}
841-
else if (ANY_BLOCK(value) && (mode & BIND_DEEP))
841+
else if ((ANY_BLOCK(value) || IS_MAP(value)) && (mode & BIND_DEEP))
842842
Bind_Block_Words(frame, VAL_BLK_DATA(value), mode);
843843
else if ((IS_FUNCTION(value) || IS_CLOSURE(value)) && (mode & BIND_FUNC))
844844
Bind_Block_Words(frame, BLK_HEAD(VAL_FUNC_BODY(value)), mode);

src/tests/units/map-test.r3

+8
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ Rebol [
2828
--assert 2 = m/b
2929
--assert empty? #[]
3030

31+
--test-- "word binding inside maps"
32+
;@@ https://github.com/Oldes/Rebol-issues/issues/2593
33+
a: 1
34+
m1: make map! [k a]
35+
m2: #[k a]
36+
--assert 1 = try [get m1/k]
37+
--assert 1 = try [get m2/k]
38+
3139
--test-- "case sensitivity"
3240
;@@ https://github.com/Oldes/Rebol-issues/issues/1153
3341
m: #[

0 commit comments

Comments
 (0)