Re: preconditions and interfaces

2019-01-20 Thread Alex via Digitalmars-d-learn
On Sunday, 20 January 2019 at 15:39:49 UTC, Antonio Corbi wrote: Hi all, Playing with interfaces and preconditions in methods I get strange results with dmd-2.0.84.0 but also with dmd-nightly. My code is like this: - import std.stdio; interface Thing2D { void width(int w

preconditions and interfaces

2019-01-20 Thread Antonio Corbi via Digitalmars-d-learn
Hi all, Playing with interfaces and preconditions in methods I get strange results with dmd-2.0.84.0 but also with dmd-nightly. My code is like this: - import std.stdio; interface Thing2D { void width(int w) in { writeln("Thing2D.width contract w = ",w);