On 04.01.2018 13:44, Jochen Theodorou wrote:
On 03.01.2018 19:56, Nathan Harvey wrote:
This idea is unrelated to categories. The behavior would be identical to
current extension methods, except you can use them within the same
project.
No special importing or scoping required, just as it works currently.
just as it works currently is that a service provider like structure is
used. As things are already compiled once the dynamic code takes notice
of extension methods, this means to me, that there is nothing to do here
for normal Groovy.
In my opinion we are then more talking about a "bugfix" for the static
compiler.
The relevant code entry point can be found in
StaticTypeCheckingSupport:2167. The ExtensionModuleScanner tries to load
the extensions classes as classes, which cannot work if they are not yet
compiled. getDGMMethods has to be changed as well. Maybe there are also
changes to StaticCompilationVisitor required.
bye Jochen