Skip to content

Wildcard local variable forward declarations are not recognised #8

@Shados

Description

@Shados

Moonscript recognises two kinds of wildcarded forward declaration:

  • local ^ to forward declare all uppercase-named variables in the current scope as local
  • local * to forward declare all variables in the current scope as local

moonpick does not appear to handle either of these. An example:

local *

main = ->
  foo!

foo = ->
  nil

main!

Causes:

line 4: accessing global - `foo`
================================
>   foo!

line 6: declared but unused - `foo`
===================================
> foo = ->

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions