From 97ca7117735044673da6c89ee9dff544a3526f70 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 6 Aug 2017 15:16:04 +0200 Subject: Resolve if-else block ambiguity --- old-tests/if-else/buildfile | 9 +++++++++ old-tests/if-else/test.out | 1 + 2 files changed, 10 insertions(+) (limited to 'old-tests/if-else') diff --git a/old-tests/if-else/buildfile b/old-tests/if-else/buildfile index 25fabf0..16a49fb 100644 --- a/old-tests/if-else/buildfile +++ b/old-tests/if-else/buildfile @@ -148,6 +148,15 @@ if true else print 1 +# Brace ambiguity. +# +if false + {dir}{.}: x = 0 +else + {dir}{.}: x = 1 + +print $(dir{.}:x) + # EOF test. # ./: diff --git a/old-tests/if-else/test.out b/old-tests/if-else/test.out index 58501cb..4cce943 100644 --- a/old-tests/if-else/test.out +++ b/old-tests/if-else/test.out @@ -14,3 +14,4 @@ 1 1 1 +1 -- cgit v1.1