Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Ticket #187 (new defect)

Opened 9 years ago

Incorrect template delegate analysis

Reported by: denis-shel Assigned to:
Priority: major Component: descent.ui
Version: 0.5 Keywords: template delegate
Cc:

Description

Incorrect code analysis.

other.d:

module other;

class C1(T) {
	T delegate(C1!(T)) d;
}

main.d:

module main;
import other;

void main() {
	C1!(char) v1; //ok
	C1!(char) v2; //Descent can't recognize v2's type (tells it is int)
}

But no problems with

int delegate(C1!(T)) d;

and

T delegate(T) d;

or if C1 is in main module or if v1 and v2 are in global scope