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

           Summary: Compiler crashes with double inheritance and function
                    contract
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: dl...@grotmol.net


--- Comment #0 from ´┐Żyvind Grotmol <dl...@grotmol.net> 2012-04-10 03:14:43 PDT 
---
Created an attachment (id=1087)
Test case crashing the compiler

Class C inherits from B which inherits from A. All three classes define the
same function. A and B specifies an out contract on the function (C may or may
not specify an out contract, it doesn't matter). In this case, dmd crashes
without error message, and doesn't generate the .exe file.

Here is the verbose output:
$ dmd -v e
binary    C:\D\dmd2\windows\bin\dmd.exe
version   v2.058
config    C:\D\dmd2\windows\bin\sc.ini
parse     e
importall e
import    object       
(C:\D\dmd2\windows\bin\..\..\src\druntime\import\object.di)
semantic  e
semantic2 e
semantic3 e

At this point it just stops. The rest of the output should have been as
follows, if I remove one of the two contracts:
code      e
function  e.A.foo
function  e.A.foo.__ensure
function  e.B.foo
function  e.C.foo
function  D main
C:\D\dmd2\windows\bin\link.exe e,,nul,user32+kernel32/noi;

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

Reply via email to