Scott Murphy Heiberg created GROOVY-12785:
---------------------------------------------
Summary: Completion of an unqualified name omits the implicit
receiver's methods, such as println
Key: GROOVY-12785
URL: https://issues.apache.org/jira/browse/GROOVY-12785
Project: Groovy
Issue Type: Bug
Reporter: Scott Murphy Heiberg
Since GROOVY-12448 groovysh and the Groovy Console complete through the
in-process language engine (groovy-lsp). For an unqualified name it offers
keywords, snippets, locals, the members the file's own classes declare, and
workspace types, but nothing the implicit receiver inherits or gains from
extension methods.
In groovysh, {{printl}} + Tab no longer completes to {{println}}, and {{prin}},
{{sle}} and {{sprin}} offer nothing, although Groovy 6.0.0's groovysh completes
all of them. {{this.printl}} does offer {{println}}.
An unqualified name should also offer the members of the enclosing class's
supertypes (for a script, {{Script}}'s {{print}}, {{println}} and {{printf}})
and the extension methods that apply to it ({{sleep}}, {{sprintf}}). Inside a
static method the class's instance members do not apply, while the extension
methods still do.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)