I get an ambiguity error in the following example:

namespaces
	Class
	Field
	
binding rules
	Class(Parent(p), c) : defines Class c imports Field from Class p

The error says:

Fragment is ambiguous: 
amb([[
  Namespaces([NamespaceDef("Class"),NamespaceDef("Field")]),
  Bindings([
    BindingRule(Op("Class",[Op("Parent",[Var("p")]),Var("c")]),NoWhere,
      [DefClause(Explicit,Unique,NamespaceRef(CurrentLanguage,"Class"),VarRef("c"), [],Current,NoWhere)]
    )
  ]),
  Imports([Import("Field"),Import("from"),Import("Class"),Import("p")])
],[
  Namespaces([NamespaceDef("Class"),NamespaceDef("Field")]),
    Bindings([BindingRule(Op("Class",[Op("Parent",[Var("p")]),Var("c")]),NoWhere,
      [
        DefClause(Explicit,Unique,NamespaceRef(CurrentLanguage,"Class"),VarRef("c"[],Current,NoWhere),
        ImportClause([WildcardImport([Restricted([],NamespaceRef(CurrentLanguage,"Field"))],
          [],Context(All,NamespaceRef(CurrentLanguage,"Class"),VarRef("p"),[],Current),Current,NoWhere)])
      ]
    )
  ])
]])
Submitted by Volker on 8 August 2014 at 22:06

Log in to post comments