--| Copyright (c) 1993-2006 University of Southern California and contributors. --| All rights reserved. --| Your use of this work is governed under the terms of the GNU General --| Public License version 2. -- This is a test control file test_name chg-constraint-add-create test_description After initial freezing of a generic class FOO whose formal generic parameter is constrained by DOUBLE, the constraint is changed to TEST2 with a generic creation procedure `default_create' and all references to FOO [DOUBLE] are removed. When the system is refrozen, the C code won't compile. define LOCALS "z: TEST1 [DOUBLE]" define INST "create z; print (z.times (2.5, 3.5)); io.new_line" define CONSTRAINT "NUMERIC" define BODY "do Result := m * n end" copy_sub Ace $TEST Ace copy_sub test.e $CLUSTER test.e copy_sub test1.e $CLUSTER test1.e copy_raw test2.e $CLUSTER test2.e compile_frozen compile_result ok c_compile_work c_compile_result ok execute_work NONE exec_output1 execute_result ok compare exec_output1 output1 define LOCALS "x: TEST1 [TEST2]" define INST "create x; print (x.times (t1, t1) /= Void); io.new_line" define CONSTRAINT "TEST2 create default_create end" define BODY "local x: like m y: like n do create x; create y; Result := m end" copy_sub test.e $CLUSTER test.e copy_sub test1.e $CLUSTER test1.e compile_frozen compile_result ok c_compile_work c_compile_result ok execute_work NONE exec_output2 execute_result ok compare exec_output2 output2 test_end