You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2019/02/01 05:45:00 UTC
[jira] [Resolved] (GROOVY-8535) FieldNode constructor appears to
call setType incorrectly
[ https://issues.apache.org/jira/browse/GROOVY-8535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King resolved GROOVY-8535.
-------------------------------
Resolution: Fixed
Assignee: Paul King
Fix Version/s: 3.0.0-alpha-5
2.5.6
Proposed change merged. Thanks for reporting the issue.
> FieldNode constructor appears to call setType incorrectly
> ---------------------------------------------------------
>
> Key: GROOVY-8535
> URL: https://issues.apache.org/jira/browse/GROOVY-8535
> Project: Groovy
> Issue Type: Improvement
> Affects Versions: 2.4.15
> Reporter: Eric Milles
> Assignee: Paul King
> Priority: Major
> Fix For: 2.5.6, 3.0.0-alpha-5
>
>
> If initial value expression is non-null, the first call to {{setType}} appears to have no effect.
> {code:java}
> public FieldNode(String name, int modifiers, ClassNode type, ClassNode owner, Expression initialValueExpression) {
> this.name = name;
> this.modifiers = modifiers;
> this.type = type;
> if (this.type == ClassHelper.DYNAMIC_TYPE && initialValueExpression != null)
> this.setType(initialValueExpression.getType());
> this.setType(type);
> this.originType = type;
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)