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   Resolved: 10/Mar/05 02:44 PM
Return to search
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



Guillaume Laforge made changes - 27/Jul/04 01:54 PM
Field Original Value New Value
Assignee Chris Poirier [ cpoirier ] james strachan [ jstrachan ]
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 made changes - 07/Mar/05 04:50 PM
Assignee james strachan [ jstrachan ] Jochen Theodorou [ blackdrag ]
Jochen Theodorou made changes - 07/Mar/05 04:50 PM
Status Open [ 1 ] In Progress [ 3 ]
Jochen Theodorou made changes - 08/Mar/05 06:23 PM
Link This issue is depended upon by GROOVY-105 [ GROOVY-105 ]
Jochen Theodorou added a comment - 10/Mar/05 02:44 PM

should be fixed now.


Jochen Theodorou made changes - 10/Mar/05 02:44 PM
Resolution Fixed [ 1 ]
Status In Progress [ 3 ] Resolved [ 5 ]
Fix Version/s 1.0-JSR-1 [ 10964 ]
Paul King made changes - 30/Nov/07 06:26 AM
Status Resolved [ 5 ] Closed [ 6 ]