Warn when an unqualified reference resolves to a less specific property of the current namespace while a more specific one exists in another visible namespace
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by tracing module-load name resolution and the existing ambiguous-name error path; the issue does not name source files or tests. Compare the namespace-priority candidate with compatible candidates in other visible namespaces, then identify tests covering resolution warnings. Done means module load warns with both candidate names when the chosen signature is strictly less specific.
Written by the indexing model from the issue text.
Description
Description
Name resolution prefers the current namespace (and the priority namespaces) before it selects the more specific signature. So in a module whose namespace is the one of an abstract base-class property, an unqualified reference for an object of a subclass declared in another namespace binds to the abstract property of the base class, not to the subclass's own property of the same name — silently:
MODULE NsBase;
NAMESPACE Doc;
CLASS ABSTRACT Document;
date = ABSTRACT DATE (Document);
MODULE NsSub;
REQUIRE NsBase;
NAMESPACE Sub;
CLASS Invoice : Document;
date = DATA DATE (Invoice);
MODULE NsUse;
REQUIRE NsBase, NsSub;
NAMESPACE Doc;
invoiceDate (Invoice i) = date(i); // Doc.date[Document], not Sub.date[Invoice]
The abstract property has no implementation for the subclass, so the values are NULL: a form filter on them drops every row and the columns are empty. The IDE inspection reports nothing and the server starts cleanly; the same expression in an eval script (another namespace) works, which hides the cause. The fix is to qualify the reference (Sub.date(i)).
Reason
The failure is silent and survives inspection and startup; it is found only by looking at the data.
Fix
At module load, when the candidate chosen by the namespace priority has a strictly less specific signature than a compatible candidate of another visible namespace, emit a warning naming both candidates (as the ambiguous-name error does), so that the developer can qualify the reference.
- Dominant language
- Java
- Stars
- 214
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lsfusion/platform
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
All issues in lsfusion/platform
Similar issues
-
account assessment course feature lecture
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
app:learninggoalhub enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
PropertyResolver fails on JDK classes with a non-public field named like the propertyPossibly taken @vaibhavgupta443 claimed this today. Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
apache/wicket#1991 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100