The typechecker crashes on use of non-existing type in page definition:

define page searches(int : page) {

 [exec] [ webdslc | info ] stage 3: typecheckingwebdslc: rewriting failed, trace:
 [exec] 	main_0_0
 [exec] 	webdslc_main_0_0
 [exec] 	xtc_io_wrap_5_0
 [exec] 	option_wrap_5_0
 [exec] 	lifted43
 [exec] 	xtc_io_1_0
 [exec] 	xtc_temp_files_1_0
 [exec] 	restore_always_2_0
 [exec] 	lifted31
 [exec] 	lifted4
 [exec] 	xtc_webdslc_0_0
 [exec] 	dr_scope_1_1
 [exec] 	lifted7
 [exec] 	dsl_to_core_0_0
 [exec] 	dsl_to_core_analysis_0_0
 [exec] 	stage_1_1
 [exec] 	log_timed_1_1
 [exec] 	typecheck_0_0
 [exec] 	dr_scope_1_1
 [exec] 	lifted1399
 [exec] 	rename_all_0_0
 [exec] 	alltd_1_0
 [exec] 	m_135
 [exec] 	m_135
 [exec] 	m_135
 [exec] 	m_135
 [exec] 	m_135
 [exec] 	m_135
 [exec] 	m_135
 [exec] 	rename_0_0
 [exec] 	rename_ui_0_0
 [exec] 	declare_page_definition_0_0
 [exec] 	common_declare_template_rules_0_0
 [exec] 	generate_template_name_0_0
 [exec] 	map_1_0
 [exec] 	i_252
 [exec] 	generate_template_name_helper_0_0
 [exec] [ webdslc | critical ] Internal error: with clause failed unexpectedly in rule 'generate-template-name'
 [exec]            ("searches",[GenericSort("EntityTypeNamed",["page"{"page1"}])])

BUILD FAILED

Submitted by Eelco Visser on 22 February 2010 at 13:23

On 20 March 2010 at 16:02 Nathan Bruning commented:

This error only occurs when a variable is declared with the same name as the parameter.
Somehow the typechecker uses generic types which fail while renaming the template.

Minimal test:

define page root() {
var name : Int;
}

define template atemplate(x : name) {
}

Log in to post comments