Просмотр исходного кода

Fixed construct_function when multiple constraints are used

Yentl Van Tendeloo 8 лет назад
Родитель
Сommit
4f540d7796
3 измененных файлов с 3 добавлено и 1 удалено
  1. BIN
      bootstrap/bootstrap.m.gz
  2. 1 1
      bootstrap/conformance_scd.alc
  3. 2 0
      bootstrap/constructors.alc

BIN
bootstrap/bootstrap.m.gz


+ 1 - 1
bootstrap/conformance_scd.alc

@@ -106,6 +106,7 @@ String function conformance_scd(model : Element):
 	String type_name
 	Element spo_cache
 	Element spi_cache
+	Element constraint_function
 
 	spo_cache = create_node()
 	spi_cache = create_node()
@@ -203,7 +204,6 @@ String function conformance_scd(model : Element):
 								error = (("Upper cardinality violation for incoming edge of type " + check_type) + " at ") + model_info(model, model_name)
 								return error!
 
-			Element constraint_function
 			constraint_function = read_attribute(metamodel, reverseKeyLookup(metamodel["model"], dict_read_node(typing, element)), "constraint")
 			if (element_neq(constraint_function, read_root())):
 				String result

+ 2 - 0
bootstrap/constructors.alc

@@ -310,6 +310,8 @@ Action function construct_function():
 	Element params
 	String arg_names_decl
 
+	variable_map = create_node()
+
 	while (value_neq(input(), "funcdef")):
 		// We skip over everything that is not a funcdef, as these are all just definitions of global stuff
 		log("Skip over input!")