Skip to content

Commit 0f7800b

Browse files
committed
Fix compile error on post-assign non-cast parenthesis
Fixes compile error in the following example code: ``` @A = (1 + 2) msg(123) ```
1 parent 253b5ea commit 0f7800b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/laytonsmith/core/functions/Compiler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ public static ParseTree rewrite(List<ParseTree> list, boolean returnSConcat,
222222
|| (list.get(index).getData() instanceof CFunction cf
223223
&& cf.hasFunction() && cf.getFunction() != null
224224
&& cf.getFunction().getName().equals(Compiler.p.NAME)
225-
&& list.get(index).numberOfChildren() == 1))) {
225+
&& list.get(index).numberOfChildren() == 1
226+
&& __type_ref__.createFromBareStringOrConcats(list.get(index)) != null))) {
226227
valChildren.add(list.get(index));
227228
list.remove(index);
228229
}

0 commit comments

Comments
 (0)