Opened 6 years ago

Closed 6 years ago

#80 closed defect (fixed)

With statement and function parameters.

Reported by: Thierry Delisle Owned by: Rob Schluntz <rschlunt@…>
Priority: major Component: cfa-cc
Version: 1.0 Keywords: with statment


Users expect parameters to have priority over with statements, e.g.,

#include <fstream>

struct X {
	int value;

void set(X & this, int value) with(this) {
	this.value = value;

int main() {
	X x;
	set(x, 3);
	sout | x.value | endl;
	return 0;

I think the least surprising result would be that this prints 3, i.e., the parameter value has precedence over the field value.

Change History (1)

comment:1 Changed 6 years ago by Rob Schluntz <rschlunt@…>

Owner: set to Rob Schluntz <rschlunt@…>
Resolution: fixed
Status: newclosed

In 6091435:

Add support for resolving function with clause [fixes #80]

Note: See TracTickets for help on using tickets.