Issue Details (XML | Word | Printable)

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

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

Parent class print method is wrongly picked up

Created: 06/Jan/04 05:38 AM   Updated: 26/Sep/07 08:43 PM
Component/s: None
Affects Version/s: 1.0-beta-5
Fix Version/s: 1.0-JSR-1

Time Tracking:
Not Specified

File Attachments: 1. Java Source File Element.java (0.2 kB)
2. File PrintTest.groovy (0.2 kB)

Issue Links:
dependent
 


 Description  « Hide
When extending a java class that contains several overloaded 'print' methods, groovy seems to decide that none exists and uses the global print statement instead.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Geert Bevin added a comment - 06/Jan/04 05:39 AM
Btw, this only seems to happen with the << syntax that also uses inline ${} vars.

Sam Pullara added a comment - 07/Jan/04 04:37 PM
Its probably because its a GString, not a String. Make sure that you are overloading with GString.

Geert Bevin added a comment - 22/May/04 03:14 AM
Even if it's not a GString, it shouldn't happen. This code is just an example, but in practise the extended class is part of another library that should not be made explicitely aware of Groovy.