[Issue 8767] expression of type bool() does not have a boolean value?

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 6 02:01:58 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8767


Dmitry Olshansky <dmitry.olsh at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmitry.olsh at gmail.com


--- Comment #1 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2012-10-06 01:50:00 PDT ---
> It can be fixed in the code by changing the erroring line to:
> static if ( hasFlag!( Flags.storageOrder ) == true )
> but I don't really understand why the comparison to true must be explicitely
> written since the hasFlag() method returns a bool value?

I'd expect hasFlag!(Flags.storageOrder)() to call this function. And without
parens it can be treated as function pointer. That being said 0-arg functions
usually gets called without parens implicitly.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list