Class QualifiedNameHint

java.lang.Object
org.ek9lang.compiler.support.QualifiedNameHint
All Implemented Interfaces:
BiFunction<ModuleScope, String, String>

public final class QualifiedNameHint extends Object implements BiFunction<ModuleScope, String, String>
THE hint for a QUALIFIED name 'M::X' that did not resolve, when the X the user probably meant is only IMPORTED with 'references' - by module M, or by the module the name is used in.

A qualified name reaches only what its module DEFINES: 'references' are shorthand for unqualified names inside the importing module, never re-exported and never consulted for a qualified name (front-end audit FE52/FE62). Before that rule a qualified name that missed quietly fell back to a reference by short name; now it is an error, and this names where the symbol actually lives so a person or an AI can fix it in one step. Used by every site that reports an unresolved qualified name (E03030, E50001, E50010) so the wording is the same everywhere.

The arguments are the module scope the name was used in (may be null - then there is no hint) and the name as written (only a qualified name can get a hint); the result is an explanation to append to the error message, or an empty String when there is nothing to add.