History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-408
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Rodrigo B. de Oliveira
Reporter: Arron Washington
Votes: 1
Watchers: 0
Operations

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

Explode operator not exploding when using overloaded methods

Created: 27/Jul/05 08:26 PM   Updated: 17/Nov/05 07:27 PM
Component/s: Compiler
Affects Version/s: 0.5.6
Fix Version/s: 0.7.5

Time Tracking:
Not Specified

Issue Links:
Duplicate
 


 Description  « Hide
Code is self explainatory.

contents inline, tabs-be-damned.

"""
Hello, World
Hello, World
"""
import System
vars = ("Hello", "World")
Console.WriteLine("{0}, {1}", *vars) #Broken!
Console.WriteLine("{0}, {1}", vars[0], vars[1]) #Not Broken



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Doug H - 27/Jul/05 10:28 PM
It may have something to do with overloaded methods. The example below just has internal calls and it fails too.

//comment out this 1st method and this script will work
def doit(s as string):
print "doit1", s

def doit(s as string, *args as (object)):
print "doit2", s, join(args,"-")

vars = ("Hello", "World")
doit("{0}, {1}", *vars)

Also in python you can use the unpack operator with methods that don't take a variable number of parameters, but this doesn't work in boo:
def testit(s1, s2, s3):
print s1, s2, s3
vars = ("Hello", "World", "!!!")
testit(*vars) //would unpack into:
//testit(vars[0], vars[1], vars[2])


Arron Washington - 27/Oct/05 11:26 AM
bump

Someone just butted heads with this issue in a "real life" application where they are consuming this method signature - ie, they can't change it themselves. Can it get some love from a willing volunteer?

By the way, duck typing is a hacky work-around for this issue until it can be resolved properly.


Doug H - 14/Nov/05 05:55 PM
This duplicates BOO-408