[Issue 869] Cast of a parenthesized expression combined with !is is mistaken for a C style cast and a template specialization

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 23 05:46:35 PST 2007


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


thomas-dloop at kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |spec




------- Comment #1 from thomas-dloop at kuehne.cn  2007-01-23 07:46 -------
http://www.digitalmars.com/d/overview.html
>D retains C operators and their precedence rules, order of evaluation rules, 
and promotion rules.

As C hasn't got an "!is" operator it is impossible to decide how this code 
should be interpreted:
# 
# cast(int)(foo !is null) // 1
# (cast(int)foo) !is null // 2
#


-- 



More information about the Digitalmars-d-bugs mailing list