4314 – Regression(1.062): Expression array1 && array2 doesn't compile

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4314 - Regression(1.062): Expression array1 && array2 doesn't compile
Summary: Regression(1.062): Expression array1 && array2 doesn't compile
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other All
: P2 regression
Assignee: No Owner
URL:
Keywords: patch, rejects-valid
Depends on:
Blocks:
Reported: 2010年06月14日 13:28 UTC by nfxjfg
Modified: 2015年06月09日 05:11 UTC (History)
2 users (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description nfxjfg 2010年06月14日 13:28:22 UTC
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).
Comment 1 Don 2010年06月23日 00:14:49 UTC
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
 }
Comment 2 Walter Bright 2010年06月27日 15:59:34 UTC
http://www.dsource.org/projects/dmd/changeset/561 


AltStyle によって変換されたページ (->オリジナル) /