On Tue, 06 Dec 2016 06:34:03 -0800, c...@zoffix.com wrote: > # I already have the fix; filing for records > > If you try to write `else` with an `unless` clause, you get a nice > error, telling you `unless` doesn't take `else` and you should rewrite > with `if` > > <ZoffixW> m: unless 1 {} else {} > <camelia> rakudo-moar 0ee6bc: OUTPUT«===SORRY!=== Error while > compiling <tmp>"unless" does not take "else", please rewrite using > "if"at <tmp>:1------> unless 1 {} ⏏else {}» > > However, all other possible combination still talk about `unless` not > taking `else` and suggest using `if`, even in cases where `if` would > do a different thing: > > <ZoffixW> m: unless 1 {} elsif {} > <camelia> rakudo-moar 0ee6bc: OUTPUT«===SORRY!=== Error while > compiling <tmp>"unless" does not take "else", please rewrite using > "if"at <tmp>:1------> unless 1 {} ⏏elsif {}» > <ZoffixW> m: unless 1 {} orwith {} > <camelia> rakudo-moar 0ee6bc: OUTPUT«===SORRY!=== Error while > compiling <tmp>"unless" does not take "else", please rewrite using > "if"at <tmp>:1------> unless 1 {} ⏏orwith {}» > <ZoffixW> m: without 1 {} else {} > <camelia> rakudo-moar 0ee6bc: OUTPUT«===SORRY!=== Error while > compiling <tmp>"unless" does not take "else", please rewrite using > "if"at <tmp>:1------> without 1 {} ⏏else {}» > <ZoffixW> m: without 1 {} elsif {} > <camelia> rakudo-moar 0ee6bc: OUTPUT«===SORRY!=== Error while > compiling <tmp>"unless" does not take "else", please rewrite using > "if"at <tmp>:1------> without 1 {} ⏏elsif {}» > <ZoffixW> m: without 1 {} orwith {} > <camelia> rakudo-moar 0ee6bc: OUTPUT«===SORRY!=== Error while > compiling <tmp>"unless" does not take "else", please rewrite using > "if"at <tmp>:1------> without 1 {} ⏏orwith {}»
Fixed in https://github.com/rakudo/rakudo/commit/16fbd7147f Tests in https://github.com/perl6/roast/commit/d7328b7ca2