X Tutup
Skip to content

Assigning properties on functions #388

@tomblind

Description

@tomblind

Currently, this is allowed:

function foo() {}
foo.bar = "bar";

But it produces bad code since functions are not tables in lua.

A variant of this is namespace merging into a function:

function foo() {}
namespace foo {
    export let bar = "bar";
}

I'm not sure if there's a reasonable way to support this. It's probably just something that should be an error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup