[Issue 7883] New: Compiler crashes with double inheritance and function contract
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 10 03:14:01 PDT 2012
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: nobody at puremagic.com
ReportedBy: dlang at grotmol.net
--- Comment #0 from Øyvind Grotmol <dlang at 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: -------
More information about the Digitalmars-d-bugs
mailing list