Browse Source

Fixed other bug related to constructors no longer outputting the variables

Yentl Van Tendeloo 9 years ago
parent
commit
b162adf9ba
1 changed files with 6 additions and 1 deletions
  1. 6 1
      bootstrap/constructors.alc

+ 6 - 1
bootstrap/constructors.alc

@@ -58,12 +58,17 @@ Action function construct_top_funcdef():
 	Element func
 	Element params
 	Action global
+	String name
 
 	global = create_value(!global)
 	assign = create_value(!assign)
 	resolve = create_value(!resolve)
 	constant = create_value(!constant)
-	formal = dict_read(variable_map, input())
+	name = input()
+	if (dict_in(variable_map, name)):
+		formal = dict_read(variable_map, name)
+	else:
+		formal = name
 	func = create_node()
 	params = create_node()
 	dict_add(global, "var", formal)