D issues are now
tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Summary: |
Regression(1.062): Expression array1 && array2 doesn't compile |
Product: |
D
|
Reporter: |
nfxjfg |
Component: |
dmd | Assignee: |
No Owner <nobody> |
Status: |
RESOLVED
FIXED
|
Severity: |
regression
|
CC: |
bugzilla, clugdbug
|
Priority: |
P2
|
Keywords: |
patch, rejects-valid |
Version: |
D2 |
Hardware: |
Other |
OS: |
All |
This stopped working in dmd 1.062 (maybe also affects D2):
void main() {
int[] a, b;
if (a && b) {}
}
rt.d(3): Error: Array operation a && b not implemented
This prevents compilation of at least one (Linux specific) module with Tango (in Tango trunk).
This one is trivial.
PATCH:
e2ir.c, BinExp::toElemBin(), line 2000.
----------
if ((tb1->ty == Tarray || tb1->ty == Tsarray) &&
(tb2->ty == Tarray || tb2->ty == Tsarray) &&
- op != OPeq
+ op != OPeq && op != OPandand && op != OPoror
)
{
error("Array operation %s not implemented", toChars());
return el_long(type->totym(), 0); // error recovery
}