Consider the following:
class Pogo {
Pogo() { }
Pogo(obj) { }
Pogo(Map map) { }
// property declaration(s)
}
def pogo = new Pogo(foo: bar)
- Since a map-based constructor is declared, the constructor invocation is satisfied by
Pogo(Map). Currently the no-arg constructor is (sometimes) selected.
- If
Pogo(Map) declaration is removed, the constructor invocation often fails to resolve to the no-arg variant -- due to the declaration of an additional constructor signature. This results in no hover or navigation for the type name.
- In the presence of Static Type Checking, the selected constructor (
DIRECT_METHOD_CALL_TARGET metadata) is not considered, so the default dynamic resolution determines the applicable constructor.
Consider the following:
Pogo(Map). Currently the no-arg constructor is (sometimes) selected.Pogo(Map)declaration is removed, the constructor invocation often fails to resolve to the no-arg variant -- due to the declaration of an additional constructor signature. This results in no hover or navigation for the type name.DIRECT_METHOD_CALL_TARGETmetadata) is not considered, so the default dynamic resolution determines the applicable constructor.