-preview=in might break code
Steven Schveighoffer
schveiguy at gmail.com
Fri Oct 2 23:03:00 UTC 2020
On 10/2/20 6:11 PM, Walter Bright wrote:
> On 10/2/2020 10:31 AM, Steven Schveighoffer wrote:
>> And this might not be true on a different compiler.
>
> This is looking like a serious problem.
I was wrong about this case, because it's a dynamic array (which is
specifically carved out as an exception). Indeed, there seem to be quite
a few exceptions carved out, presumably to make existing code behave
reasonably.
But this could be true for another type that isn't in the exception
categories. Potentially, a compiler can decide to make the following not
true, while others say it is true:
alias A = void delegate(in long);
alias B = void delegate(const long);
static assert(is(A : B));
-Steve
More information about the Digitalmars-d
mailing list