struct OhWhy(S) { S[] arr; alias arr this; } void main() { static assert(!is(OhWhy!float unused == T[],T));/*fails,but shouldn't since struct OhWhy isn't an array */ }
Reduced testcase --- struct S { float[] arr; alias arr this; } static assert(!is(S == float[])); // ok static assert(!is(S == T[], T)); // fails ---
PR : https://github.com/dlang/dmd/pull/8839
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/c4fa519661dcb584b23a4573c0e549925b5339db Fix Issue 9274 and 11499 - is + alias this = wrong code https://github.com/dlang/dmd/commit/80ce8b1ead69489e17d6ddaa8bb7b92d5890a6d9 Merge pull request #8839 from RazvanN7/Issue_9274 Fix Issue 9274 and 11499 - is + alias this = wrong code