groovy

The print statement overrides parent print methods

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-beta-5
  • Fix Version/s: 1.0-JSR-1
  • Component/s: parser
  • Labels:
    None
  • Number of attachments :
    0

Description

Base.java:
public abstract class Base extends Base2
{
}

Base2.java:
public class Base2
{
public void print(Object out)

{ System.out.println("Base:"+out); }

}

Simple.groovy
class Simple extends Base
{
static void main(args)

{ simple = new Simple() simple.process() }

void process()

{ print("ok") }

}

prints out "ok" instead of "Base:ok"

Trying with Simple.java:
public class Simple extends Base
{
public static void main(String[] args)

{ Simple simple = new Simple(); simple.process(); }

public void process()

{ print("ok"); }

}

behaves correctly

Issue Links

Activity

Hide
Guillaume Laforge added a comment -

Could you please have a look at this old bug, submitted by our fried Geert Bevin ?
After this bug is fixed, I think it's worth releasing beta-7.

Show
Guillaume Laforge added a comment - Could you please have a look at this old bug, submitted by our fried Geert Bevin ? After this bug is fixed, I think it's worth releasing beta-7.
Hide
blackdrag blackdrag added a comment -

should be fixed now.

Show
blackdrag blackdrag added a comment - should be fixed now.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: