source: tests/withconflict.cfa @ 358e3481

Last change on this file since 358e3481 was 4883712, checked in by Andrew Beach <ajbeach@…>, 11 months ago

Added a test showing how the conflict handling in the with clause currently works.

  • Property mode set to 100644
File size: 297 bytes
RevLine 
[4883712]1// No printing required, test is an error on second with statement.
2void result(int i, float f) {}
3
4struct Cell {
5        int value;
6};
7
8int main(void) {
9        int value = 0;
10        float value = 1;
11        Cell cell = { 2 };
12        with ( cell ) {
13                result(value, value);
14        }
15        with ( cell, cell ) {
16                result(value, value);
17        }
18}
Note: See TracBrowser for help on using the repository browser.