From c81ebaa7d47644da7232025d54ff9f1486169152 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Mon, 2 Nov 2026 22:15:15 +0800 Subject: [PATCH] feat(option): builtin Option uses the Nil variant The lazily registered builtin template now declares Nil = 0 instead of None_. --- App/lib/core/Gen/Class/ClassGenGeneric.vp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App/lib/core/Gen/Class/ClassGenGeneric.vp b/App/lib/core/Gen/Class/ClassGenGeneric.vp index 51d53f8..660fb55 100644 --- a/App/lib/core/Gen/Class/ClassGenGeneric.vp +++ b/App/lib/core/Gen/Class/ClassGenGeneric.vp @@ -73,7 +73,7 @@ novirtual class ClassGenGeneric(ClassGenBase.ClassGenBase): if self._find_generic_template("Option") is not None: return 1 pp: memhub.MemBuddy* = CompilerFactory.factory.PermPool if pp is None: return 0 - src: str = "renum Option[T]:\n class Some:\n value: T\n None_ = 0\n" + src: str = "renum Option[T]:\n class Some:\n value: T\n Nil = 0\n" tree: ast.AST* = ast.parse_ex(src, pp, pp) if tree is None or tree.children is None: return 0 cd: ast.ClassDef* = None