[Linux] Haxe's file compiling error. (Printer.hx)
-
Here is the error:
/usr/share/haxe/std/haxe/xml/Printer.hx:113: characters 9-20 : Only inline or read-only (default, never) fields can be used as a pattern
Printer.hx:113
. . . function hasChildren(value:Xml):Bool { // 110. line for (child in value) { switch (child.nodeType) { case Xml.Element, Xml.PCData: // 113. line [ERROR HERE] return true; case Xml.CData, Xml.Comment: if (StringTools.ltrim(child.nodeValue).length != 0) { return true; } case _: } } return false; } // 123. line . . .
Any solutions? Thanks!
-
I think you want to use
XmlType.Element
and notXml.Element
. XmlType is the enum, and Xml is the class. AlthoughXml
does declare the same thing... Hmm. Why don't you try using XmlType.Element, and tell me if it works.
-
@Desttinghim this is not my class :D this is haxe's itself :) (I'm trying to change it...)
-
O_o I don't know then. The error doesn't make sense to me after looking at the sources.
-
@Desttinghim maybe it is about the compiler? Isn't there any haxeflixel developers using linux?
-
PROBLEM SOLVED:
You should install haxe from : http://www.openfl.org/download/- Download tar.gz
- Extract
- (If you want to change version of haxe you can change by open install script with any text editor.)
- Run install script from terminal with sudo
- Finished!
/usr/lib/haxe <- Haxe path.
/usr/lib/haxe/lib <- Haxelib libraries path.Thanks to @alihassan very much!