source: CIVL/examples/languageFeatures/arrayCompat6.cvl@ bb03188

main test-branch
Last change on this file since bb03188 was 191916b, checked in by Stephen Siegel <siegel@…>, 9 months ago

Made one simple change to CommonExecutor: got rid of dynamic
check compatibility between old and new values at an assignment.
Instead, the assignment will check compatibility of new value
with dynamic type derived from static value of variable. This was
already happening for an initializer, but not for an already
initialized value. Now it is always happening, regardless of
whether the variable was initialized. 8 different new examples
regarding this feature have been added.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5975 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 253 bytes
Line 
1int main() {
2 int a[2][2] = (int[2][2])$lambda(int i,j) 0;
3 int b[][] = (int[3][3])$lambda(int i,j) 0;
4 b = a; // should this change the symbolic type of b?
5 b[0] = (int[10])$lambda(int i) 10; // ok
6 //a[0] = (int[10])$lambda(int i) 10; // error
7}
Note: See TracBrowser for help on using the repository browser.