From c89477d615fb0ce4d89786ef848ffe6aca1da088 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 06:50:29 +0000 Subject: feat(classes): support explicit NEW constructor method calls Co-Authored-By: Claude Opus 5.5 --- lib/CodeGen/Designator.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/CodeGen/Designator.cc') diff --git a/lib/CodeGen/Designator.cc b/lib/CodeGen/Designator.cc index adf08f1..13eb25f 100644 --- a/lib/CodeGen/Designator.cc +++ b/lib/CodeGen/Designator.cc @@ -56,9 +56,7 @@ void CodeGen::runTypePrePass(const std::vector> &Statem for (const auto &Method : Class->getMethods()) { SaveAndRestore Location(DiagnosticLine, Method->getLine()); const std::string &Name = Method->getProto()->getName(); - if (sameIdentifier(Name, "NEW")) { - reportError("NEW constructors are not implemented"); - } else if (sameIdentifier(Name, "this")) { + if (sameIdentifier(Name, "this")) { reportError("A method cannot be named this"); } else if (!Names.insert(Name).second) { reportError("Duplicate member %s in class %s", Name.c_str(), Class->getName().c_str()); -- cgit v1.3.1-4-g156e