Skip to content

Type Inference with numeric literal is insufficient #184

Open
@gunyarakun

Description

@gunyarakun

I want to compile this code without error.

class _Main {
  static function main(args : string[]) : void {
    var a: int = 0;
    var b = 0: int;
    var c: number = 0;
    var d = 0: number;
  }
}
[test.jsx:4:13] expected keyword: ;
    var b = 0: int;
             ^

[test.jsx:6:13] expected keyword: ;
    var d = 0: number;
             ^

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