www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - #dbugfix Issue 15984

reply Mario =?UTF-8?B?S3LDtnBsaW4=?= <linkrope github.com> writes:
[REG2.071] Interface contracts retrieve garbage instead of 
parameters
https://issues.dlang.org/show_bug.cgi?id=15984

This regression from 2016 causes random crashes if you use one of 
the key features of D - Contract Programming.
Mar 06 2018
next sibling parent Ronny Spiegel <ronny.spiegel googlemail.com> writes:
+1
Mar 07 2018
prev sibling next sibling parent Mike Parker <aldacron gmail.com> writes:
On Tuesday, 6 March 2018 at 17:36:08 UTC, Mario Kröplin wrote:
 [REG2.071] Interface contracts retrieve garbage instead of 
 parameters
 https://issues.dlang.org/show_bug.cgi?id=15984

 This regression from 2016 causes random crashes if you use one 
 of the key features of D - Contract Programming.
Noted!
Mar 07 2018
prev sibling next sibling parent Eugene Wissner <belka caraus.de> writes:
On Tuesday, 6 March 2018 at 17:36:08 UTC, Mario Kröplin wrote:
 [REG2.071] Interface contracts retrieve garbage instead of 
 parameters
 https://issues.dlang.org/show_bug.cgi?id=15984

 This regression from 2016 causes random crashes if you use one 
 of the key features of D - Contract Programming.
+1
Mar 07 2018
prev sibling next sibling parent reply nkm1 <t4nk074 openmailbox.org> writes:
On Tuesday, 6 March 2018 at 17:36:08 UTC, Mario Kröplin wrote:
 [REG2.071] Interface contracts retrieve garbage instead of 
 parameters
 https://issues.dlang.org/show_bug.cgi?id=15984

 This regression from 2016 causes random crashes if you use one 
 of the key features of D - Contract Programming.
+1 And if it's difficult to fix, maybe just don't allow contracts in interfaces? The way they (contracts) work with inherited objects is kind of counter intuitive and not very useful (opinion).
Mar 07 2018
parent Eugene Wissner <belka caraus.de> writes:
On Wednesday, 7 March 2018 at 12:04:11 UTC, nkm1 wrote:
 On Tuesday, 6 March 2018 at 17:36:08 UTC, Mario Kröplin wrote:
 [REG2.071] Interface contracts retrieve garbage instead of 
 parameters
 https://issues.dlang.org/show_bug.cgi?id=15984

 This regression from 2016 causes random crashes if you use one 
 of the key features of D - Contract Programming.
+1 And if it's difficult to fix, maybe just don't allow contracts in interfaces? The way they (contracts) work with inherited objects is kind of counter intuitive and not very useful (opinion).
It isn't that easy also. There is a lot of code that uses interface contracts. It would require a few yeas deprecaction period during that the bug still exists. And disabling it for the interfaces just postpones the problem since it remains for the classes. And removing it for classes and interfaces would destroy one of the nice D features.
Mar 07 2018
prev sibling parent MWumpusZ <sinkhole01 bregalad.de> writes:
+1

An unfortunate thing with the bug report is that compact examples 
tend to involve fairly dodgy looking assert(false) contracts - 
which look and feel like "you're doing it wrong".  BUT the issue 
exists in realistic code, it just isn't as compactly demonstrable 
:|
Mar 14 2018