Issue 11587 - Cannot compare AAs at compile time
Summary: Cannot compare AAs at compile time
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: CTFE, pull, rejects-valid
Depends on:
Blocks:
 
Reported: 2013-11-23 21:29 UTC by yebblies
Modified: 2015-06-09 05:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description yebblies 2013-11-23 21:29:26 UTC
static assert([1:2, 3:4] == [3:4, 1:2]);

testx.d(2): Error: cannot compare [1:2, 3:4] at compile time
testx.d(2):        while evaluating: static assert([1:2, 3:4] == [3:4, 1:2])
Comment 3 dransic 2015-03-24 14:34:26 UTC
Is this error related to this (supposedly fixed) bug?

static assert([1: 1] != [1: 2, 2: 1]); // OK
static assert([1: 1] != [1: 2]); // OK
static assert([1: 1] != [2: 1]); // Error!

DMD 2.067-rc1
Comment 4 Kenji Hara 2015-03-24 15:27:36 UTC
(In reply to Nicolas Sicard from comment #3)
> Is this error related to this (supposedly fixed) bug?
> 
> static assert([1: 1] != [1: 2, 2: 1]); // OK
> static assert([1: 1] != [1: 2]); // OK
> static assert([1: 1] != [2: 1]); // Error!
> 
> DMD 2.067-rc1

It's a bug in the pull 2869 implementation.

New issue for that: https://issues.dlang.org/show_bug.cgi?id=14325