1993 – Error calling vararg delegate with null

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1993 - Error calling vararg delegate with null
Summary: Error calling vararg delegate with null
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, rejects-valid
Depends on:
Blocks:
Reported: 2008年04月14日 10:45 UTC by Chris Miller
Modified: 2014年02月24日 15:31 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 Chris Miller 2008年04月14日 10:45:01 UTC
Note the comments; the one is causing an error but should work:
void blah(bool delegate(char[][] words ...) callback)
{
	callback("foo", "bar"); // OK
	callback("foo"); // OK
	//callback(null, "bar"); // DMD 1.028: Error: expected 1 arguments, not 2
	callback(cast(char[])null, "bar"); // OK
	callback((char[]).init, "bar"); // OK
}
Comment 1 yebblies 2011年07月02日 20:44:14 UTC
https://github.com/D-Programming-Language/dmd/pull/195 


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