
|
If you were logged in you would be able to see more operations.
|
|
|
Boo
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
|
|
|
Issue Links:
|
Duplicate
|
|
|
|
This issue is duplicated by:
|
|
BOO-605
Varargs messes up if there are multiple methods with the same name.
|
|
|
|
|
|
|
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
|
|
Description
|
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 |
Show » |
|
//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])