From 86d97403461522b89bff33c14721564c1d28e54e Mon Sep 17 00:00:00 2001 From: Conor Bronsdon <120674402+conorbronsdon@users.noreply.github.com> Date: Fri, 31 Jul 2026 14:31:32 -0700 Subject: [PATCH] Replace the removed String.write static call with the String constructor Mojo's stdlib made String.write an instance method -- both overloads now take `mut self` -- so the old static form no longer resolves and the test module fails to parse. String.__init__ takes a variadic pack of Writable arguments and Error conforms to Writable, so String(e) is the direct replacement. Test-only; nothing in src/ used the static form. Co-Authored-By: Claude Opus 5 (1M context) --- test/test_errors.mojo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_errors.mojo b/test/test_errors.mojo index 812c1bc..2fa63fd 100644 --- a/test/test_errors.mojo +++ b/test/test_errors.mojo @@ -10,7 +10,7 @@ def _assert_lc(source: String, offset: Int, line: Int, col: Int) raises: def _msg(e: Error) -> String: - return String.write(e) + return String(e) # --------------------------------------------------------------------------