You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typePerson(name: string)=inherit DynamicObj()let mutablename= name
memberthis.Namewith get()= name
andset(value)= name <- value
memberthis.Walk()= printfn "%s is walking" name
You can currently set a dynamic property with the same name as an existing method.
letp= Person("John")
p.SetValue("Walk","Shadowing")
p.Walk()// John is walking
p.GetValue("Walk")// val it: obj = "Shadowing"
Yes this is transpilable as far as I know. In principle it could the same logic as the Systen.ICloneable.Clone() lookup you implemented for the DeepCopy method. E.g.
On another Note, this currently removes the method in transpiled Code right? I think this is expected behaviour in js/py right? So when we prevent this it gets less idiomatic in those languages
Given the following class
You can currently set a dynamic property with the same name as an existing method.
Should this work, or fail? @kMutagene
The text was updated successfully, but these errors were encountered: