https://issues.dlang.org/show_bug.cgi?id=2809
Walter Bright changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=2809
--- Comment #5 from Sobirari Muhomori dfj1es...@sneakemail.com 2010-11-16
11:53:02 PST ---
short a(short b) { return bcast(short)1; }
Shouldn't number literals work as smallest possible type and promoted as
needed?
Like here:
---
byte a=1;
---
http://d.puremagic.com/issues/show_bug.cgi?id=2809
--- Comment #6 from Sobirari Muhomori dfj1es...@sneakemail.com 2010-11-16
11:59:34 PST ---
Number literals are polysemous, right? So binary ops should work like this:
opBinary(l,r)
{
if(is(typeof(r)==polysemous))
{
http://d.puremagic.com/issues/show_bug.cgi?id=2809
simon s.d.hamm...@googlemail.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=2809
--- Comment #4 from Don clugd...@yahoo.com.au 2010-11-15 15:06:34 PST ---
(In reply to comment #3)
Mr Bs test case is wrong:
static assert((cast(short)-1 1) == int.max);
should be:
static assert((cast(short)-1 1) == short.max);
Not
http://d.puremagic.com/issues/show_bug.cgi?id=2809
Don clugd...@yahoo.com.au changed:
What|Removed |Added
Keywords||patch
--- Comment #2 from
http://d.puremagic.com/issues/show_bug.cgi?id=2809
Don clugd...@yahoo.com.au changed:
What|Removed |Added
CC||clugd...@yahoo.com.au