D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17120 - error messages from wrong overload
Summary: error messages from wrong overload
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 critical
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2017-01-25 00:26 UTC by John Colvin
Modified: 2024-12-13 18:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description John Colvin 2017-01-25 00:26:29 UTC
struct S(size_t _)
{
	// void foo(size_t i)(S!(i) rhs){}  //OK
	void foo(size_t i)(S!(+i) rhs){} //Error
	void foo(){}
}

void main()
{
	S!4 v1;
	v1.foo();
}

test.d(4): Error: undefined identifier 'i'

Also, if I comment out the `void foo(){}` overload the compiler still complains about the undefined identifier, but also prints the "cannot deduce function from argument types" as expected.
Comment 1 dlangBugzillaToGithub 2024-12-13 18:51:24 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/19228

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB