[Issue 1518] New: Crash using 'scope', 'with' and undefined 'RegExp'

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 19 07:02:52 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1518

           Summary: Crash using 'scope', 'with' and undefined 'RegExp'
           Product: D
           Version: 2.004
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: regan at netmail.co.nz


//Compiling this results in a DMD crash.

void main()
{
        int i;
        scope(exit) i++;
        with(new RegExp(``)) {}
}

E:\D\src\tmp>dmd -v bug002.d
parse     bug002
semantic  bug002
import    object        (E:\D\dmd\bin\..\src\phobos\object.d)
semantic2 bug002
semantic3 bug002
bug002.d(5): Error: identifier 'RegExp' is not defined
bug002.d(5): Error: RegExp is used as a type
bug002.d(5): Error: new can only create structs, dynamic arrays or class
objects
, not void's
bug002.d(5): Error: with expressions must be class objects, not 'void*'

<crash>


-- 



More information about the Digitalmars-d-bugs mailing list