Files
@ ed4fe8216eb0
Branch filter:
Location: CSY/reowolf/testdata/parser/positive/16.pdl - annotation
ed4fe8216eb0
484 B
text/plain
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...
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...
1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 1b7b852c3395 | #version 100
composite main() {
channel xo -> xi;
new a(xi);
new c(xo);
}
primitive a(in x) {
synchronous {
msg m = get(x);
assert m.length == 5;
assert m[0] == 'h';
assert m[1] == 'e';
assert m[2] == 'l';
assert m[3] == 'l';
assert m[4] == 'o';
}
}
primitive b(out x) {
synchronous (msg m) {
put(x, m);
}
}
// or
primitive c(out x) {
synchronous {
msg m = create(5);
m[0] = 'h';
m[1] = 'e';
m[2] = 'l';
m[3] = 'l';
m[4] = 'o';
put(x, m);
}
}
|