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

Key: BOO-886
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Cedric Vivier
Reporter: Ayende Rahien
Votes: 0
Watchers: 0
Operations

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

Bad error message when using variable number of arguments

Created: 03/Oct/07 02:37 AM   Updated: 20/May/08 09:09 AM
Component/s: Parser
Affects Version/s: None
Fix Version/s: 0.8.3

Time Tracking:
Not Specified


 Description  « Hide
This line

def constructor(*args as string):

Gives this error:

expecting "LPAREN", found 'string'. (BCE0044)

It confused the hell out of me, until I figured out that I need:

def constructor(*args as (string) ):



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Cedric Vivier - 05/Feb/08 10:14 AM
Should we issue a better error message or infer "*args as string" means "*args as (string)" ?

Rodrigo B. de Oliveira - 05/Feb/08 12:45 PM
we can change the parser rule to accept any type reference and then issue a better error message ("varargs must be an array type").