Skip to content

Cannot call instance method and operator new in one place #207

Closed
@MaxGraey

Description

@MaxGraey
class Boo {
   foo(): i32 { return 1 }
}
var test = (new Boo()).foo();

so we need use this:

var boo = new Boo();
var test = boo.foo();

error output:

ERROR AS100: Operation not supported.

 var test = (new Boo()).foo();
             ~~~~~~~~~
 in main.ts(6,12)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions