We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could be related to #35
paramNoType
Reflect.setField
as3 code for example:
package { public class Issue { public function Issue() { var paramNoType = "hello"; if(this[paramNoType].bool == true) { this[paramNoType].bool = false; this[paramNoType].prop1.prop2 = "nothing"; } var paramString:String = "hello"; if(this[paramString].bool == true) { this[paramString].bool = false; this[paramString].prop1.prop2 = "nothing"; } var paramDynamic:* = "hello"; if(this[paramDynamic].bool == true) { this[paramDynamic].bool = false; this[paramDynamic].prop1.prop2 = "nothing"; } } public function functionParamsTest(paramDynamic:*, paramString:String, paramNoType) { if(this[paramNoType].bool == true) { this[paramNoType].bool = false; this[paramNoType].prop1.prop2 = "nothing"; } if(this[paramString].bool == true) { this[paramString].bool = false; this[paramString].prop1.prop2 = "nothing"; } if(this[paramDynamic].bool == true) { this[paramDynamic].bool = false; this[paramDynamic].prop1.prop2 = "nothing"; } } } }
expected result
class Issue { public function new() { var paramNoType = "hello"; if (Reflect.field(Reflect.field(this, Std.string(paramNoType)), "bool") == true) { Reflect.setField(Reflect.field(this, Std.string(paramNoType)), "bool", false); Reflect.setField(Reflect.field(this, Std.string(paramNoType)).prop1, "prop2", "nothing"); } var paramString : String = "hello"; if (Reflect.field(Reflect.field(this, paramString), "bool") == true) { Reflect.setField(Reflect.field(this, paramString), "bool", false); Reflect.setField(Reflect.field(this, paramString).prop1, "prop2", "nothing"); } var paramDynamic : Dynamic = "hello"; if (Reflect.field(Reflect.field(this, Std.string(paramDynamic)), "bool") == true) { Reflect.setField(Reflect.field(this, Std.string(paramDynamic)), "bool", false); Reflect.setField(Reflect.field(this, Std.string(paramDynamic)).prop1, "prop2", "nothing"); } } public function functionParamsTest(paramDynamic : Dynamic, paramString : String, paramNoType) { if (Reflect.field(Reflect.field(this, Std.string(paramNoType)), "bool") == true) { Reflect.setField(Reflect.field(this, Std.string(paramNoType)), "bool", false); Reflect.setField(Reflect.field(this, Std.string(paramNoType)).prop1, "prop2", "nothing"); } if (Reflect.field(Reflect.field(this, paramString), "bool") == true) { Reflect.setField(Reflect.field(this, paramString), "bool", false); Reflect.setField(Reflect.field(this, paramString).prop1, "prop2", "nothing"); } if (Reflect.field(Reflect.field(this, Std.string(paramDynamic)), "bool") == true) { Reflect.setField(Reflect.field(this, Std.string(paramDynamic)), "bool", false); Reflect.setField(Reflect.field(this, Std.string(paramDynamic)).prop1, "prop2", "nothing"); } } }
actual result
class Issue { public function new() { var paramNoType = "hello"; if (this[paramNoType].bool == true) { this[paramNoType].bool = false; this[paramNoType].prop1.prop2 = "nothing"; } var paramString : String = "hello"; if (Reflect.field(this, paramString).bool == true) { Reflect.setField(this, paramString, false).bool; Reflect.setField(this, paramString, "nothing").prop1.prop2; } var paramDynamic : Dynamic = "hello"; if (Reflect.field(this, Std.string(paramDynamic)).bool == true) { Reflect.setField(this, Std.string(paramDynamic), false).bool; Reflect.setField(this, Std.string(paramDynamic), "nothing").prop1.prop2; } } public function functionParamsTest(paramDynamic : Dynamic, paramString : String, paramNoType) { if (this[paramNoType].bool == true) { this[paramNoType].bool = false; this[paramNoType].prop1.prop2 = "nothing"; } if (Reflect.field(this, paramString).bool == true) { Reflect.setField(this, paramString, false).bool; Reflect.setField(this, paramString, "nothing").prop1.prop2; } if (Reflect.field(this, Std.string(paramDynamic)).bool == true) { Reflect.setField(this, Std.string(paramDynamic), false).bool; Reflect.setField(this, Std.string(paramDynamic), "nothing").prop1.prop2; } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Could be related to #35
( see cases with
paramNoType
)Reflect.setField
conversion is wrong for multiple level objectsas3 code for example:
expected result
actual result
The text was updated successfully, but these errors were encountered: