digitalmars.D.bugs - [Issue 4949] New: ICE on invalid static if using value of 'this'
- d-bugmail puremagic.com (35/35) Sep 27 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4949
- d-bugmail puremagic.com (15/15) Sep 27 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4949
- d-bugmail puremagic.com (12/12) Oct 08 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4949
http://d.puremagic.com/issues/show_bug.cgi?id=4949
Summary: ICE on invalid static if using value of 'this'
Product: D
Version: D1 & D2
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: ibuclaw ubuntu.com
Created an attachment (id=777)
catch functions returning CANT_INTEPRET_EXP
testcase:
class A
{
bool delegate() dg;
void B()
{
static if ( dg() )
should error graciously;
}
}
Produces:
ice.d(6): Error: value of 'this' is not known at compile time
Segmentation fault (core dumped)
Catching it in gdb, occurs in interpret.c at CallExp::interpret, around line
2720. A few assignments, no checking whether or not any returned
EXP_CANT_INTERPRET.
Currently rebuilding using the attached change...
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 27 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4949
Iain Buclaw <ibuclaw ubuntu.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
Tested, I now get:
ice.d(6): Error: value of 'this' is not known at compile time
ice.d(6): Error: expression this.dg() is not constant or does not evaluate to a
bool
Which is correct, and fixes the ICE.
Regards
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 27 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4949
Walter Bright <bugzilla digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |bugzilla digitalmars.com
Resolution| |FIXED
14:12:57 PDT ---
http://www.dsource.org/projects/dmd/changeset/710
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 08 2010









d-bugmail puremagic.com 