digitalmars.D.bugs - [Issue 4283] New: static if with dangling else clause
- d-bugmail puremagic.com (25/25) Jun 06 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4283
- d-bugmail puremagic.com (7/7) Jun 06 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4283
- d-bugmail puremagic.com (28/28) Aug 12 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4283
- d-bugmail puremagic.com (13/13) Oct 27 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4283
- d-bugmail puremagic.com (11/11) Oct 27 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4283
- d-bugmail puremagic.com (15/15) Oct 27 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4283
- d-bugmail puremagic.com (12/12) Nov 08 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4283
http://d.puremagic.com/issues/show_bug.cgi?id=4283 Summary: static if with dangling else clause Product: D Version: future Platform: x86 OS/Version: Windows Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc This D2 program compiles and runs with v2.046, but the syntax is wrong: template Foo(bool b) { static if (b) enum bool Foo = 1; else } static assert(Foo!(true) == 1); void main() {} -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 06 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4283 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: -------
Jun 06 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4283 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: -------
Aug 12 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4283 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|patch |pull 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: -------
Oct 27 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4283 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 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: -------
Oct 27 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4283 yebblies <yebblies gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yebblies gmail.com Platform|x86 |All Version|D1 & D2 |D1 Summary|static if with dangling |(D1 only) static if with |else clause |dangling else clause OS/Version|Windows |All Fixed D2 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 27 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4283 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Fixed D1: https://github.com/D-Programming-Language/dmd/commit/a3993d4d56b129bafa2466f7c99c9a8c4e4b65bc -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 08 2012