[Issue 4283] static if with dangling else clause

2012-10-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4283



--- Comment #4 from github-bugzi...@puremagic.com 2012-10-27 08:43:28 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/7f91fe6c8cd379f8f9d2ab92f3dad32791e35624
fix Issue 4283 - static if with dangling else clause

https://github.com/D-Programming-Language/dmd/commit/9d7f15ae8135db7e3461efd584d824063572c984
Merge pull request #1230 from 9rnsr/fix4283

Issue 4283 - static if with dangling else clause

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


[Issue 4283] static if with dangling else clause

2012-10-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4283


Kenji Hara  changed:

   What|Removed |Added

   Keywords|patch   |pull


--- Comment #3 from Kenji Hara  2012-10-27 07:34:11 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1230

If DeclDefs is required just one declaration but there is no declaration,
parseDeclDefs should raise a syntax error.

I think my pull request is much simpler than the original patch.

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


[Issue 4283] static if with dangling else clause

2012-08-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4283



--- Comment #2 from Ellery Newcomer  2012-08-12 
23:51:08 PDT ---
The problem is if parseBlock encounters a rcurly, it consumes nothing.
Otherwise, it will consume

{ decldefs }
: decldefs
decldefs
;

As near as I can tell, consuming nothing serves no purpose in the parser, but
it does allow the following:

class C{
public
}
struct S{
static auto
}
interface F{
extern(C)
}
union Z{
extern private
}

class C2{
align
}

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


[Issue 4283] static if with dangling else clause

2010-06-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4283



--- Comment #1 from Ellery Newcomer  2010-06-06 
12:15:49 PDT ---
Created an attachment (id=658)
rearranged parseBlock a bit for better error messages

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