Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

haxe nightlies: import and using may not appear after a type declaration #4

Closed
deltaluca opened this Issue · 9 comments

2 participants

Luca Deltodesco Stéphane Le Dorze
Luca Deltodesco

when compiling with -D haxe3 :: Parser.hx 59

when compiling without -D haxe3, i get an error from 'monax' about Context having no field currentPos (and working aruond that, that it has no field typeof... no idea where these errors are about).

Using caue's linux64 nightlies, latest

Stéphane Le Dorze
Owner
Stéphane Le Dorze
Owner
Luca Deltodesco

package;
import com.mindrocks.text.ParserMonad;
class Main {
static function main() {}
}

compile haxe -main Main -swf Main.swf -lib Parsex

/usr/lib/haxe/lib/monax/1,3/com/mindrocks/monads/Monad.hx:72: characters 44-62 : haxe.macro.#Context has no field currentPos
/usr/lib/haxe/lib/monax/1,3/com/mindrocks/monads/Monad.hx:80: characters 30-44 : haxe.macro.#Context has no field typeof

compile haxe -main Main -swf Main.swf -lib Parsex -D haxe3

/usr/lib/haxe/lib/Parsex/1,3/com/mindrocks/text/Parser.hx:59: characters 0-32 : import and using may not appear after a type declaration
/usr/lib/haxe/lib/Parsex/1,3/com/mindrocks/text/Parser.hx:41: lines 41-58 : Previous type declaration found here

Caue's linux64 r5587

Stéphane Le Dorze
Owner
Luca Deltodesco

There's a very good reason for that, bernards builds are currently somewhat broken... for instance --dead-code-eliminatino still works although it's long been removed and replaced by --dce full|std and in his builds you don't need @:isVar for properties to generate the hidden field which is also required by haxe svn, and seemingly the same thing with still permitting type declarations after an import/using etc.

Caue's builds are properly in sync with svn

(see http://code.google.com/p/haxe/source/detail?r=5491 for instance, after r5491 --dead-code-elimination can no longer be used... yet bernards builds even up to r5587 are still permitting it and giving error when using --dce)

Stéphane Le Dorze
Owner
Luca Deltodesco

Didn't realise you'd made the changes. I now get these errors instead:

/usr/lib/haxe/lib/monax/1,4/com/mindrocks/monads/Monad.hx:85: characters 50-66 : Identifier 'CType' is not part of enum haxe.macro.Constant
/usr/lib/haxe/lib/monax/1,4/com/mindrocks/monads/Monad.hx:85: characters 50-66 : For function argument 'c'

CType is removed for haxe3, unified with CIdent.

Modifying the files locally, doing a find/replace from 'CType' to '#if haxe3 CIdent #else CType#end' fixes the problems with haxe nightly completely as far as I can tell, both with -D haxe3 and without.

Stéphane Le Dorze
Owner
Stéphane Le Dorze
Owner

Please reopen it if it still applies wit Monax 2.0

Stéphane Le Dorze sledorze closed this
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.