ponylang / pony-tutorial

:horse: Tutorial for the Pony programming language
http://tutorial.ponylang.io
BSD 2-Clause "Simplified" License
310 stars 111 forks source link

Generic 'get' function should have default refcap #507

Closed djavorszky closed 2 years ago

djavorszky commented 2 years ago

Having fun ref get(): this->A => _c results in compile error:

Error: /home/djavorszky/dev/helloworld/main.pony:7:18: can only use 'this' for a viewpoint in a box function fun ref get(): this->A => _c

Works with fun get(): this->A => _c

SeanTAllen commented 2 years ago

Thanks