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.2
2+ ## Fixes
3+ - You can now edit the properties of special objects in scripts
4+
15# 22.2.1
26## Fixes
37- Fixed the ` Special object cannot be an enum constructor ` error showing up even if the special object is not an enum constructor
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.1 " ,
12+ "version" : " 22.2.2 " ,
1313 "classPath" : " src/" ,
1414 "releasenote" : " Check CHANGELOG.md" ,
1515 "contributors" : [
Original file line number Diff line number Diff line change @@ -220,7 +220,10 @@ class Interp {
220220 }
221221
222222 function setVar ( name : String , v : Dynamic ) {
223- variables .set (name , v );
223+ if ( specialObject != null && specialObject .obj != null && specialObjectsFields .contains ( name ) )
224+ Reflect .setProperty (specialObject .obj , name , v );
225+ else
226+ variables .set (name , v );
224227 }
225228
226229 function assign ( e1 : Expr , e2 : Expr ) : Dynamic {
@@ -234,8 +237,22 @@ class Interp {
234237 {
235238 if ( finalVariables .exists (id ) )
236239 return error (EInvalidFinal (id ));
237-
238- if (! variables .exists (id ))
240+
241+ var i = 0 ;
242+ if ( ! variables .exists (id ) )
243+ i ++ ;
244+ if ( specialObject != null ) {
245+ if ( specialObject .obj != null ) {
246+ if ( ! specialObjectsFields .contains ( id ) )
247+ i ++ ;
248+ }
249+ else
250+ i ++ ;
251+ }
252+ else
253+ i ++ ;
254+
255+ if ( i == 2 )
239256 error (EUnknownVariable (id ));
240257 setVar (id ,v );
241258 }
You can’t perform that action at this time.
0 commit comments