Closed cereschen closed 9 months ago
warning 1) is about returning type "R | null" R is not the same size as "null" as R in generic will be boolean. You can ignore it, it is just place where u need to be careful
warning 2) about using "yield", as yield should return "[false, undefined]" as last element thus "undefined" will be casted into type R which boolean and thus will be set as "false"
BTW: as u r returning type in "get" R | null
u need to have special access code to it
const v = obj.get('1111');
if (typeof v == "boolean")
console.log("val 1111 (bool): ", v);
else
console.log("this is null");
This code has no errors, but it still reports this warning. I guess it's related to generics
`:0: warning: types have different sizes:
'!llvm.struct<packed (ptr, i1)>' size of #9,
'!llvm.struct<packed (ptr, ptr)>' size of #16