moonscript icon indicating copy to clipboard operation
moonscript copied to clipboard

support `local` hoist in class body

Open leafo opened this issue 1 year ago • 0 comments

When using local in class block the declaration should be hoisted top so methods can access it. This already works correctly with assign, as seen in second example

class Something
  local thing
  
  new: => 
    print thing
class Something
  thing = nil
  
  new: => 
    print thing

leafo avatar Dec 01 '24 22:12 leafo