boo-lang / boo

The Boo Programming Language.
BSD 3-Clause "New" or "Revised" License
874 stars 148 forks source link

Strange issues when exploding parameters #20

Open johtso opened 12 years ago

johtso commented 12 years ago
def test(*args):
    for arg in args:
        print arg

# Works fine:
test(*(1, 'test'))

# Results in two blank lines:
test(*(1, 2))

# Crash!
test(*(1, 2, 3))
jbevain commented 12 years ago

explode all the parameters

bamboo commented 12 years ago

Thanks for the report. Meanwhile you can make it work by making sure you always pass an array of object to the method:

test(*(of object: 1, 2))

That won't be necessary in the future.