27e4b014af33 — Leonard Ritter 3 months ago
* compiler.Printer: fixed `crepr`
1 files changed, 5 insertions(+), 1 deletions(-)

M lib/scopes/compiler/Printer.sc
M lib/scopes/compiler/Printer.sc +5 -1
@@ 247,6 247,10 @@ struct StringPrinter < Printer
     inline __countof (self)
         countof self.string
 
+    inline tostring (self)
+        'flush-style self
+        'emit (storagecast self) 'string
+
     inline fwrite (self str size)
         'append-from-arrayptr self.string (str as rawstring) size
         (copy size) as usize

          
@@ 639,7 643,7 @@ inline cprint2 (...)
 inline crepr (...)
     sprint := (StringPrinter)
     (view sprint) ...
-    sprint as String as string
+    'tostring sprint
 
 spice creport (...)
     raising Error