From 225b35c9070f94cf79c90c33ffcee84b281f894d Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Wed, 8 Aug 2018 17:11:54 +0100
Subject: 43261: Fix unary minus with base.
Apply unary minus to a complete lexical constant rather than the
first component that comes along.
---
Test/C01arith.ztst | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'Test')
diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst
index 77a46ebd5..f1364ab36 100644
--- a/Test/C01arith.ztst
+++ b/Test/C01arith.ztst
@@ -467,3 +467,7 @@
>6
>4
?(eval):6: bad math expression: lvalue required
+
+ print $(( -2#101-16#f ))
+0: Unary minus doesn't apply to base but to number as a whole.
+>-20
--
cgit 1.4.1