[NBL] fails to resolve in the presence of multiple references to different namespaces
Doesn’t properly resolve a Var(x) where x refers to a Field. We think this is due to the presence of multiple namespaces in the rule for Var since the Type(x) rules resolve properly.
Module Class Field Function Variable
rulesSubmitted by Hassan Chafi on 28 October 2012 at 06:11
Module(x, _) : defines Module x scopes Class Class(x, _) : defines Class x of type Type(x) scopes Field Parameter(t, x) : defines Variable x of type t Field(t, x) : defines Field x of type t Function(x,p*,b) : defines Function x scopes Variable Type(x) : refers to Class x refers to Class "String" refers to Class "Int" Var(x): refers to Variable x refers to Field x
This is a bug in the name resolution algorithm.
A workaround is to change every “scopes Field” and “scopes Variable” to scope both Fields and variables:
Class(x, _) : defines Class x of type Type(x) scopes Variable, Field Function(x,p*,b) : defines Function x scopes Variable, Field
I made the changes, but still having an issue. resolution fails for Fields inside a function.
Can you show me your project so I can have a look?
I will email you the code.
Should work with 1.1 already.
This should at least be confirmed before 1.1.
This issue is caused by a missing scope.
Currently, classes scope fields. A field
cgets a URI
Field://c/f. Functions scope variables. A variable
fgets a URI
Var://f/v. When a variable or field reference
vfis resolved, the following URIs can be resolved:
Field://vf. None of these URIs will meet the URI of an actual field, since the class name is missing in the URI.
The definition can be fixed by classes scoping functions. This will include class names in the URIs:
Field://c/vf(this one will actually match fields in the surrounding class),
Log in to post comments