This repository was archived by the owner on Apr 20, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 22.2.1
2+ ## Fixes
3+ - Fixed the ` Special object cannot be an enum constructor ` error showing up even if the special object is not an enum constructor
4+
15# 22.2.0
26## Additions
37- Special objects now supports Classes and Enums
Original file line number Diff line number Diff line change 99 " script"
1010 ],
1111 "description" : " SScript (also known as SuperlativeScript), fork of HScript with fixes and improvements." ,
12- "version" : " 22.2.0 " ,
12+ "version" : " 22.2.1 " ,
1313 "classPath" : " src/" ,
1414 "releasenote" : " Check CHANGELOG.md" ,
1515 "contributors" : [
Original file line number Diff line number Diff line change @@ -508,8 +508,11 @@ class SScript
508508 if (Std .isOfType (obj , i ))
509509 throw ' Special object cannot be ${i }' ;
510510
511- if (Type .getEnum (obj ) != null )
512- throw ' Special object cannot be an enum constructor ( ${Type .getEnumName (Type .getEnum (obj ))})' ;
511+ switch Type .typeof (obj ) {
512+ case TEnum (e ):
513+ throw ' Special object cannot be an enum constructor ( ${Type .getEnumName (e )})' ;
514+ default :
515+ }
513516
514517 if (interp .specialObject == null )
515518 interp .specialObject = {obj : null , includeFunctions : null , exclusions : null };
You can’t perform that action at this time.
0 commit comments