7c4d7e4ebbfe — Leonard Ritter a month ago
* Rc: support for comparing refcounted values with not refcounted values of the same type
1 files changed, 9 insertions(+), 0 deletions(-)

M lib/scopes/Rc.sc
M lib/scopes/Rc.sc +9 -0
@@ 252,6 252,15 @@ typedef+ Rc
         static-if (cls == other-cls)
             inline (self other)
                 == (storagecast (_view self)) (storagecast (_view other))
+        elseif (other-cls == cls.Type)
+            inline (self other)
+                == (@ (storagecast (_view self))) other
+
+    @@ memo
+    inline __r== (other-cls cls)
+        static-if (other-cls == cls.Type)
+            inline (other self)
+                == other (@ (storagecast (_view self)))
 
     inline __hash (self)
         hash (storagecast (_view self))