Skip to content

Issue 1570 - Syntax error from keyword-enum-constructors with arguments - haxe #1570

Closed
@issuesbot

Description

@issuesbot

[Google Issue #1570 : https://code.google.com/p/haxe/issues/detail?id=1570]
by si...@haxe.org, at 27/02/2013, 17:46:42

enum Token {
    Const(i:String);
}
class Main {
    static public function main() {
        var x = Const("foo");
    }
}

The generated PHP code has
$x = Token::Const("foo");

Which errors with
Parse error: syntax error, unexpected T_CONST, expecting T_STRING or T_VARIABLE or '$'

This is a regression.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions