Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
October 29, 2009 [Issue 3450] New: is (typeof({ ... }())) unexpected return | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=3450 Summary: is (typeof({ ... }())) unexpected return Product: D Version: 2.035 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: critical Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: kamaboco@gmail.com --- Comment #0 from kamaboco@gmail.com 2009-10-29 08:19:37 PDT --- struct Foo { enum bool BAR = is (typeof({}())); // Error: static assert (0 == 1) is false static assert (BAR == is (typeof({}()))); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
January 17, 2010 [Issue 3450] incorrect result for is (typeof({ ... }())) inside a struct | ||||
---|---|---|---|---|
| ||||
Posted in reply to kamaboco@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=3450 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rejects-valid |patch, wrong-code CC| |clugdbug@yahoo.com.au Summary|is (typeof({ ... }())) |incorrect result for is |unexpected return |(typeof({ ... }())) inside | |a struct --- Comment #1 from Don <clugdbug@yahoo.com.au> 2010-01-16 23:30:16 PST --- PATCH: in FuncDeclaration::semantic3(), it's forbidden to use function literals as class members. But, it should be OK to use them inside a typeof() expression. ---------- Index: func.c =================================================================== --- func.c (revision 335) +++ func.c (working copy) @@ -789,14 +789,14 @@ if (ad) { VarDeclaration *v; - if (isFuncLiteralDeclaration() && isNested()) + if (isFuncLiteralDeclaration() && isNested() && !sc->intypeof) { error("literals cannot be class members"); return; } else { - assert(!isNested()); // can't be both member and nested + assert(!isNested() || sc->intypeof); // can't be both member and nested assert(ad->handle); Type *thandle = ad->handle; #if STRUCTTHISREF -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 06, 2010 [Issue 3450] incorrect result for is (typeof({ ... }())) inside a struct | ||||
---|---|---|---|---|
| ||||
Posted in reply to kamaboco@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=3450 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla@digitalmars.com --- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2010-02-05 19:54:33 PST --- changeset 371 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 06, 2010 [Issue 3450] incorrect result for is (typeof({ ... }())) inside a struct | ||||
---|---|---|---|---|
| ||||
Posted in reply to kamaboco@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=3450 Kosmonaut <Kosmonaut@tempinbox.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Kosmonaut@tempinbox.com --- Comment #3 from Kosmonaut <Kosmonaut@tempinbox.com> 2010-02-05 23:39:34 PST --- (In reply to comment #2) > changeset 371 http://www.dsource.org/projects/dmd/changeset/371 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
March 09, 2010 [Issue 3450] incorrect result for is (typeof({ ... }())) inside a struct | ||||
---|---|---|---|---|
| ||||
Posted in reply to kamaboco@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=3450 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #4 from Walter Bright <bugzilla@digitalmars.com> 2010-03-08 22:20:53 PST --- Fixed dmd 1.057 and 2.041 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation