Skip to content

Raise a more intelligible error when trying to convert static method with name eqal to constructor #86

Closed
@danog

Description

@danog

When trying to convert a static method constructor, the parser throws an unintelligible error, Parse Error : syntax error, unexpected 'function Object() { [native code] }', expecting T_STRING on line n, a more specific error would be nice for JS newbies.

Example code that triggers the error:

<?php class a { public static function constructor() {} }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions