Yeah looks like the problem goes away with the latest aardvark from
git.
On Apr 25, 5:11 pm, Carson Gross <
carsongr...@gmail.com> wrote:
> Maybe a bug fix in Gosu?
>
> Cheers,
> Carson
>
>
>
>
>
>
>
> On Mon, Apr 25, 2011 at 2:09 PM, Brian Chang <
bchan...@gmail.com> wrote:
> > Hm, I see this issue in 0.3.2, but somehow things are fine in my bleeding
> > edge 0.3.3 build, both with and without the parameter type. Hang on, and
> > I'll follow up on the other thread so that you can build 0.3.3 from source.
>
> > On Mon, Apr 25, 2011 at 1:31 PM, Carson Gross <
carsongr...@gmail.com>wrote:
>
> >> It might be a vark issue, rather than a gosu issue. I don't know what
> >> version of gosu the current release of vark is using...
>
> >> Cheers,
> >> Carson
>
> >> On Mon, Apr 25, 2011 at 1:24 PM, Chris Gow <
chris....@gmail.com> wrote:
>
> >>> Yeah, I tried that with the same result. The code does work as is if its
> >>> a gsp file (gotta love type inference) and I call one of the functions.
>
> >>> On Mon, Apr 25, 2011 at 4:15 PM, Gus Prevas <
kpre...@gmail.com> wrote:
>
> >>>> I think you need to specify the type of your optional parameter:
>
> >>>> private function withOptionalParameter(required_param : String,
> >>>> bg* : boolean* = false) {
>
> >>>> On Mon, Apr 25, 2011 at 3:45 PM, chris <
chris....@gmail.com> wrote:
>
> >>>>> Hi:
>
> >>>>> Are optional parameters allowed in non-target functions allowed in
> >>>>> aardvark? The following simple vark file reports errors:
>
> >>>>> function targetUsingOptionalValue() {
> >>>>> withOptionalParameter("some parameter")
> >>>>> }
>
> >>>>> function targetSpecifyingValue() {
> >>>>> withOptionalParameter("some other param", true)
> >>>>> }
>
> >>>>> private function withOptionalParameter(required_param : String,
> >>>>> bg=false) {
> >>>>> print("Hello: ${required_param} - ${bg}")
> >>>>> }
>
> >>>>> Wrong number of arguments to function
> >>>>> withOptionalParameter(java.lang.String, boolean). Expected 2, got 1.
> >>>>> [line:3 col:25] in
> >>>>> line 2: function targetUsingOptionalValue() {
> >>>>> line 3: withOptionalParameter("some parameter")
> >>>>> line 4: }
> >>>>> Line Number: 3 Column: 25
>
> >>>>> Thanks
>
> >>>>> Chris
>
> > --
> > Brian
> >
bchan...@gmail.com