Skip to content

Extend type inferencing of dynamic field or property assigned in constructor or initialization method #1080

@monrealis

Description

@monrealis

It seems that the correct type is inferred only in the simple way where assignment is made at the location of declaration. Maybe it can be improved?

image

It does not work, for example, when def variable is assigned in Spock's setup().

Related article from 2009: http://contraptionsforprogramming.blogspot.com/2009/11/how-type-inferencing-for-groovy-in.html

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions