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
{{ message }}
Repository navigation
[JS/TS] an explicit class that inherits another explicit class loses the base #5168
typeBase=valName:stringnew(name)={ Name = name }typeDerived=inherit Base
valExtra:intnew()={inherit Base("derived"); Extra =5}
Derived().Name is undefined (.NET derived). The emitted class Derived does not extend Base, and the constructor calls Base's constructor function and discards the result. Members of Base called on a Derived then see none of its fields.
Fixed by #5226: Derived now extends Base and calls super(...), so Derived().Name is "derived" as on .NET. #5226 also added tests for this pattern in tests/Js/Main/TypeTests.fs.
Activity
MangelMaxime commentedon Nov 2, 2026
Fixed by #5226:
Derivednow extendsBaseand callssuper(...), soDerived().Nameis"derived"as on .NET. #5226 also added tests for this pattern intests/Js/Main/TypeTests.fs.