[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Bug with logical operator or misunderstanding?
- From: Philipp Janda <siffiejoe@...>
- Date: Thu, 20 Jan 2011 17:11:40 +0100
Am 20.01.2011 16:45, schrieb Michal Kottman:
> On Thu, 2011-01-20 at 10:37 -0500, Thierry Van Elsuwe wrote:
>> Is this a bug, or can someone can explain me why we have 1 instead of
> I guess this is a known bug - http://www.lua.org/bugs.html#5.1.4-3 .
Probably, but the given patch does not work for this case.
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> print(((1 or false) and true) or false)
> print( (1 or 2) and true or false )
> print(((1 or true) and true) or false)
First test is from the bugs page and works correctly with the given
patch, second (and third) test is still wrong.