larsiusprime / polymod

Atomic modding framework for Haxe
MIT License
161 stars 62 forks source link

Syntax error: PolymodFileSystem Expected ')' #108

Closed EliteMasterEric closed 2 years ago

EliteMasterEric commented 2 years ago

Discussed in https://github.com/larsiusprime/polymod/discussions/107

Originally posted by **hafimiee** March 5, 2022 C:/HaxeToolkit/haxe/lib/polymod/1,5,2/polymod/fs/PolymodFileSystem.hx:19: characters 16-18 : Expected )
BoagerEpic301 commented 2 years ago

same

EliteMasterEric commented 2 years ago

This is weird because I haven't reproduced it myself.

@BoagerEpic301 What version of Haxe are you using?

EliteMasterEric commented 2 years ago

@hafimiee I'd also like to know your Haxe version to see if it's relevant to the issue.

BoagerEpic301 commented 2 years ago

im using 4.1.5 for compiling kade engine

BoagerEpic301 commented 2 years ago

nvm i just had to switch to 1.4.3 for it to compile correctly

j0912345 commented 2 years ago

@MasterEric changing all occurrences of "is" to "==" in the if else statement fixes the error. PolymodFileSystem.zip

applerex commented 2 years ago

public static function makeFileSystem(cls:Dynamic = null, params:PolymodFileSystemParams):IFileSystem { if (cls == null) { // We need to determine the class to instantiate. return _detectFileSystem(params); } else if ((cls is Class)) { // Else, instantiate the provided class. return cast Type.createInstance(cls, [params]); } else { Polymod.error(BAD_CUSTOM_FILESYSTEM, "Passed an unknown type for a custom filesystem. Reverting to default..."); return makeFileSystem(null, params); } }

Wo0fle commented 2 years ago

@BoagerEpic301

You had to switch all the way from 4.1.5 to 1.4.3?????

Did you mean 4.1.3???

EliteMasterEric commented 2 years ago

Sorry I've been so busy, just posted a 1.5.3 with some minor fixes I've been working on, including a proper one for this issue.

hayfidev commented 2 years ago

@hafimiee I'd also like to know your Haxe version to see if it's relevant to the issue.

Sorry for a very late reply, it's the latest version of Haxe, I didn't saw any notifications.