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
exportclassBox<T>{constructor(protectedreadonlyval: T){}/** * Create a Box version of value * @param val boxed value * @returns value of Box version */
@inlinestaticfrom<T>(val: T): Box<T>{returnnewBox(val);}
@inline
@operator("==")eq(other: this |null): bool{if(other===null)returnfalse;returnthis.val==other.val;}
@inline
@operator("!=")notEq(other: this |null): bool{if(other===null)returnfalse;returnthis.val!=other.val;}// ...}
But I cannot do toStrictEqual for option.
unexpectednull[Stack]: RuntimeError: unreachableatnode_modules/@as-pect/assembly/assembly/internal/Reflect/Reflect.equals<assembly/box/Box<assembly/__tests__/primitive/option.spec/Person>|null>(<anonymous>:wasm-function[98]:0x26b8)atassembly/primitive/option/Option<assembly/__tests__/primitive/option.spec/Person>#__aspectStrictEquals (<anonymous>:wasm-function[100]:0x272c)atnode_modules/@as-pect/assembly/assembly/internal/Reflect/referencesEqual<assembly/primitive/option/Option<assembly/__tests__/primitive/option.spec/Person>>(<anonymous>:wasm-function[101]:0x28bd)atnode_modules/@as-pect/assembly/assembly/internal/Reflect/Reflect.equals<assembly/primitive/option/Option<assembly/__tests__/primitive/option.spec/Person>>(<anonymous>:wasm-function[102]:0x2953)atnode_modules/@as-pect/assembly/assembly/internal/Reflect/Reflect.equals<assembly/primitive/option/Option<assembly/__tests__/primitive/option.spec/Person>>@varargs(<anonymous>:wasm-function[104]:0x29fb)atnode_modules/@as-pect/assembly/assembly/internal/Expectation/Expectation<assembly/primitive/option/Option<assembly/__tests__/primitive/option.spec/Person>>#toBe (<anonymous>:wasm-function[108]:0x2ae2)
at start:assembly/__tests__/primitive/option.spec~anonymous|0~anonymous|1(<anonymous>:wasm-function[109]:0x2b7d)atnode_modules/@as-pect/assembly/assembly/internal/call/__call(<anonymous>:wasm-function[208]:0x5241)
The text was updated successfully, but these errors were encountered:
I define a Option:
And the Box:
But I cannot do
toStrictEqual
for option.The text was updated successfully, but these errors were encountered: