﻿id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc
81	Resolution Failure on Pass-by-value	a3moss		"If the two commented lines in the following code are un-commented, this code fails to resolve, apparently because the `T ?*? (T, T);` constraint can't be satisfied. Everything else appears to work (this may be related to #8).

{{{
struct counter { int x; };

void ?{} (counter& c, one_t) {
	c.x = 1;
}

forall(otype T | { void ?{} (T&, one_t); })
T unit() {
	T u = 1;
	return u;
}

counter ?*? (counter a, counter b) {
	return (counter){ a.x * b.x };
}

forall(otype T | { T ?*? (T, T); })
T square(T x) { return x * x; }

int main() {
	counter c = 1;
	printf(""%d\n"", c.x);

	counter u = unit();
	printf(""%d\n"", u.x);

	counter p = c * u;
	printf(""%d\n"", p.x);

//	counter s = square(c);
//	printf(""%d\n"", s.x);
}
}}}"	defect	closed	major	cfa-cc	1.0	invalid		
