1524 – ICE(constfold.c) on using "is" with strings in CTFE

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1524 - ICE(constfold.c) on using "is" with strings in CTFE
Summary: ICE(constfold.c) on using "is" with strings in CTFE
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 minor
Assignee: Walter Bright
URL:
Keywords: ice-on-valid-code, patch, rejects-valid
Depends on:
Blocks:
Reported: 2007年09月22日 06:22 UTC by Vladimir Panteleev
Modified: 2014年02月17日 22:51 UTC (History)
1 user (show)

See Also:


Attachments
Patch against DMD2.029 (460 bytes, patch)
2009年05月05日 02:09 UTC, Don
Details | Diff
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 Vladimir Panteleev 2007年09月22日 06:22:41 UTC
-----
bool isNull(char[] str)
{
	return str is null;
}
const bool test = isNull("hello!");
-----
Output:
> Assertion failure: '0' on line 838 in file 'constfold.c'
> 
> abnormal program termination
Replacing "is" with "==" fixes it.
Comment 1 Don 2009年05月05日 02:09:03 UTC
Created attachment 351 [details] 
Patch against DMD2.029
Another trivial one. The case where only one parameter was null had been forgotten.
Comment 2 Walter Bright 2009年07月09日 02:46:02 UTC
Fixed dmd 1.046 and 2.031


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