6859 – Segfault when abstract method uses with contract.

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6859 - Segfault when abstract method uses with contract.
Summary: Segfault when abstract method uses with contract.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, wrong-code
Depends on:
Blocks:
Reported: 2011年10月27日 09:32 UTC by Koichi
Modified: 2011年11月08日 00:34 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Koichi 2011年10月27日 09:32:59 UTC
This code doesn't work!
--------------------
import std.stdio;
 
void main(string[] args)
{
 auto t = new Child;
 t.fuga();
 writeln("done.");
}
 
class Parent
{
public:
 bool isHage() const @property;
 
public:
 abstract void fuga()
 out
 {
 assert(isHage);
 }
 body { }
}
 
class Child : Parent
{
 override bool isHage() const @property
 {
 return true;
 }
 override void fuga()
 {
 //nop
 }
}
--------------------
Comment 1 Kenji Hara 2011年10月28日 03:35:48 UTC
https://github.com/D-Programming-Language/dmd/pull/478 


AltStyle によって変換されたページ (->オリジナル) /