[Issue 19545] __traits(compiles, X) false positive, further uses of X succeed but don't link
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 4 20:22:55 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=19545
Salih Dincer <salihdb at hotmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |salihdb at hotmail.com
--- Comment #6 from Salih Dincer <salihdb at hotmail.com> ---
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);
}//*/
--
More information about the Digitalmars-d-bugs
mailing list