Menu

#16 Please support Vargargs

None
closed
nobody
None
5
2018-08-01
2008-05-11
christian
No

Please take a look at:
http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html

So this code is going to work with java but not in beanshell.

public class foo {
public static void bar(String... a){
print(a.length);
}
}

// Error: Parser Error: Parse error at line 5, column 32. Encountered: .
bsh % // Error: Parser Error: Parse error at line 1, column 3. Encountered: )
bsh % // Error: EvalError: Class or variable not found: a.length : at Line: 2 : in file: <unknown file> : a .length

bsh % // Error: Parser Error: Parse error at line 4, column 1. Encountered: }

This is a feature from java itself many people are waiting for, please support this in beanshell too.

Thanks
Chris

Discussion

  • Ilja Preuß

    Ilja Preuß - 2008-06-10

    Logged In: YES
    user_id=52599
    Originator: NO

    +1!

     
  • nickl-

    nickl- - 2018-08-01
    • status: open --> closed
    • Group: -->
     
  • nickl-

    nickl- - 2018-08-01

    Ticket has been migrated to github.
    Please follow up on this over here: https://github.com/beanshell/beanshell/issues/105

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.