https://issues.dlang.org/show_bug.cgi?id=19545
--- Comment #8 from John Colvin <[email protected]> --- (In reply to Salih Dincer from comment #6) > No error, result is true: > > void main() > { > pragma(msg, __traits(compiles, inputRangeObject(RegexMatch!string.init))); > inputRangeObject(RegexMatch!string.init); > } > //import std.range, std.regex;/* > struct RegexMatch(T){} > > class InputRangeObject(R){ > this(R){} > R front(){ return R.init; } > } > > InputRangeObject!R inputRangeObject(R)(R range) { > return new InputRangeObject!R(range); > }//*/ Yes, if the code is correct then there is no problem. But the code in my example is not correct and despite that, the traits compiles gives true and then in more recent compilers the code does compile but then can’t link. --
