← Back to index
|
Original Bugzilla link
Bug 18252 – [Reg 2.078] comparison of arrays of associative arrays no longer compiles
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-01-17T10:18:22Z
Last change time
2018-02-01T14:44:34Z
Keywords
pull
Assigned to
No Owner
Creator
Heromyth
Comments
Comment #0
by bitworld — 2018-01-17T10:18:22Z
Tow arrays of associative array can't be compared. Compiler: DMD 2.078 Error message: D:\Dlang\dmd2\windows\bin\..\..\src\druntime\import\object.d(3461,31): Error: no property 'tupleof' for type 'string[int]' D:\Dlang\dmd2\windows\bin\..\..\src\druntime\import\object.d(3461,53): Error: no property 'tupleof' for type 'string[int]' source\app.d(11,6): Error: template instance object.__equals!(string[int], string[int]) error instantiating dmd failed with exit code 1. =====Test code====== import std.stdio; import std.algorithm; void main() { bool r; string[int][] aa1; string[int][] aa2; // r = __equals!(string[int], string[int])(aa1, aa2); // bug r = aa1 == aa2; // bug // r = equal(aa1, aa2); // ok }
Comment #1
by radu.racariu — 2018-01-24T13:06:32Z
This is a regression introduced in 2.078
Comment #2
by greensunny12 — 2018-01-24T15:00:14Z
Probably due to
https://github.com/dlang/druntime/pull/1824
Comment #3
by code — 2018-01-24T19:45:43Z
cat > bug.d << CODE void foo() { string[int][] aa1, aa2; auto r = aa1 == aa2; } CODE Digger says:
https://github.com/dlang/dmd/pull/7225
Comment #4
by code — 2018-01-24T19:57:55Z
https://github.com/dlang/druntime/pull/2058
Comment #5
by github-bugzilla — 2018-02-01T14:44:33Z
Commits pushed to master at
https://github.com/dlang/druntime
https://github.com/dlang/druntime/commit/589695d34118951a5f37ff862ff04f51548d9edd
fix Issue 18252 - comparison of arrays of associative arrays broken - add missing handling of associative arrays as array elements to __equals
https://github.com/dlang/druntime/commit/c4bc836402fd3d266c34ec18bc3c6ae4712d9449
Merge pull request #2058 from MartinNowak/fix18252 fix Issue 18252 - comparison of arrays of associative arrays broken