#dbugfix Issue 15984
[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.
Re: #dbugfix Issue 15984
+1
Re: #dbugfix Issue 15984
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!
Re: #dbugfix Issue 15984
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
Re: #dbugfix Issue 15984
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).
Re: #dbugfix Issue 15984
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.
Re: #dbugfix Issue 15984
+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 :|