Issue Details (XML | Word | Printable)

Key: GROOVY-466
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Jochen Theodorou
Reporter: Geert Bevin
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
groovy

The print statement overrides parent print methods

Created: 13/May/04 03:27 AM   Updated: 30/Nov/07 06:26 AM
Component/s: parser
Affects Version/s: 1.0-beta-5
Fix Version/s: 1.0-JSR-1

Time Tracking:
Not Specified

Issue Links:
dependent
 


 Description  « Hide
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



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Guillaume Laforge added a comment - 27/Jul/04 01:54 PM
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.

Jochen Theodorou added a comment - 10/Mar/05 02:44 PM
should be fixed now.