Files @ ed4fe8216eb0
Branch filter:

Location: CSY/reowolf/testdata/parser/positive/15.pdl

MH
Fix binding- and assignment-expression related typing issues.

Simpler solutions are better, so the typechecker is back to normal.
Instead we simply make sure that assignment expression is never
nested under another expression, and binding expressions may only
be nested under LogicalAnd-expressions. If only I knew why I thought
type shenanigans were a good idea in the first place...
#version

import std.reo;

composite main(out c) {
	channel ao -> ai;
	channel bo -> bi;
	channel axo -> axi;
	channel zo -> zi;
	new sync(ai, bo);
	new replicator(bi, {axo, c});
	new consensus({axi, zi}, ao);
	new generator(zo);
}

primitive generator(out z) {
	while (true) {
		synchronous (msg x) {
			if (x == null) {
				put(z, x);
				assert !fires(x);
			} else {
				put(z, x);
				assert fires(x);
			}
		}
	}
}