Error running the "Delegate" sample snippet from the documenation

53 views
Skip to first unread message

Vinoo

unread,
Oct 7, 2017, 8:29:52 PM10/7/17
to gosu-lang
I was going through the following document. https://gosu-lang.github.io/docs.html

Section: Superclasses, Interfaces and Delegates. Got error when I was trying out the snippet.
Unexpected token: return [line:7 col:33] in
line 6: 
line 7:    property get Impl : Runnable {
line 8:      return _runnable
Line Number: 7  Column: 33

class MyRunnable implements Runnable {
    ..
    //Missing the () 
    property get Impl : Runnable {
       return _runnable
    }
}


German Muñoz

unread,
Mar 16, 2019, 7:48:24 PM3/16/19
to gosu-lang
If you comment the gettter method, the example will run anyway, the getter is not needed

// property get Impl : Runnable {
     //return _runnable
   //}

Is just a hack to continue the tutorials 
Reply all
Reply to author
Forward
0 new messages