define editEntity( e : Entity ){

	if ( e isa NewsItem) {
		"do something"
	} else if(e isa Profile){
		"do something"
	}
	
}

gives “Template with signature else() not defined” and ambiguous fragment on template:

	- Fragment is ambiguous: amb([Define([],"editEntity",[Arg("e",SimpleSort("Entity"))],None,
	 [IfElseIfTempl(IsA(Var("e"),SimpleSort("NewsItem")),[TemplateCallNoBody("edit",[Cast(Var("e"),SimpleSort("NewsItem"))])],
	 [ElseIfTempl(IsA(Var("e"),SimpleSort("Profile")),[Text("")])],None)]),Define([],"editEntity",[Arg("e",SimpleSort("Entity"))],None,
	 [IfNoElseTempl(IsA(Var("e"),SimpleSort("NewsItem")),[TemplateCallNoBody("edit",
	 [Cast(Var("e"),SimpleSort("NewsItem"))])]),TemplateCallNoArgs("else"),IfNoElseTempl(IsA(Var("e"),SimpleSort("Profile")),
	 [Text("")])])])
Submitted by Elmer van Chastelet on 13 January 2014 at 14:43


On 13 January 2014 at 15:24 Elmer van Chastelet closed this issue.

Log in to post comments