Skip to content

Meal.hx:1: characters 0-7 is missing ; #2531

Closed
rezaakhmadg opened this Issue Jan 14, 2014 · 2 comments

3 participants

@rezaakhmadg

Hello

im a very newbie in here and i need help that im trying to compile my simple code of haxe , and it still an error with Meal.hx:1: characters 0-7 is missing ;

i dont know where the error is, here's the code:

Meal.hx

package MyFridge;
class Meal
{
    public var name : String;
    public function new(f_name : String)
        {
        this.name = f_name;
        }
}

Thank you

@deltaluca

package names must start with a lower case letter (similarly type names must start with a capital letter).

since MyFridge is not a valid package name, the only other parsing rule in the haxe syntax for package declarations isfor the empty package (package;) hence the error that ; was expected.

@Simn
Haxe Foundation member
Simn commented Jan 14, 2014

Yes, but the error message is really confusing, so I think we should improve that.

@Simn Simn was assigned Jan 20, 2014
@Simn Simn closed this in 465b775 Feb 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.