Comment #0 by snarwin+bugzilla — 2023-11-02T11:48:53Z
As of DMD 2.105.2, the following program fails to compile:
---
struct S { int x, y; }
void main()
{
auto s1 = S(123, 456);
auto s2 = S(123, 456);
assert(s1.tupleof is s2.tupleof);
}
---
The error message is:
---
test.d(7): Error: incompatible types for `(AliasSeq!(s1.x, s1.y)) is (AliasSeq!(s2.x, s2.y))`: both operands are of type `(int, int)`
---
If the `is` operator is replaced with `==`, the program compiles and runs successfully.
Comment #1 by johan_forsberg_86 — 2023-11-02T11:57:55Z
Up to 2.077.1: Failure with output: onlineapp.d(7): Error: incompatible types for ((tuple(s1.x, s1.y)) is (tuple(s2.x, s2.y))): '(int, int)' and '(int, int)'
2.078.3: Failure with output: onlineapp.d(7): Error: incompatible types for ((tuple(s1.x, s1.y)) is (tuple(s2.x, s2.y))): both operands are of type '(int, int)'
2.079.1 to 2.104.2: Failure with output: onlineapp.d(7): Error: incompatible types for `(tuple(s1.x, s1.y)) is (tuple(s2.x, s2.y))`: both operands are of type `(int, int)`
Since 2.105.2: Failure with output: onlineapp.d(7): Error: incompatible types for `(AliasSeq!(s1.x, s1.y)) is (AliasSeq!(s2.x, s2.y))`: both operands are of type `(int, int)`
Comment #2 by robert.schadek — 2024-12-13T19:31:30Z