Can't we use upper case characters in package?

166 views
Skip to first unread message

Freewind

unread,
Jan 14, 2013, 12:47:29 AM1/14/13
to haxe...@googlegroups.com
I have package named "AdminMenus", but it throws exception when I compile it:

package ;

import AdminMenus.ShowTree;

class Main {

    public static function main() {
    }

}

The error message is: 

haxe: E:/WORKSPACE/app/haxe/Main.hx:3: characters 0-27 : Class not found : AdminMenus

But if I change it to lower case "adminmenus", everything is well.

Can we use upper case characters in package name? What characters can we use?

I tried to find a language specification of haxe, but not found. The document <http://haxe.org/ref/packages> doesn't not mention it.

John Plsek

unread,
Jan 14, 2013, 12:59:32 AM1/14/13
to haxe...@googlegroups.com
Each part of the path in package names must begin with a lower case letter and, like all types, type names in packages must begin with an upper case letter. Hence My.Pack is an invalid package, as is my.Pack. Similarly, my.pack.e would not be a valid type name or import.

that's from http://haxe.org/ref/packages

Cheers
> --
> To post to this group haxe...@googlegroups.com
> http://groups.google.com/group/haxelang?hl=en
>  
>  
>  

Freewind

unread,
Jan 14, 2013, 1:02:46 AM1/14/13
to haxe...@googlegroups.com
Thanks for your quick and kind answers!
Reply all
Reply to author
Forward
0 new messages