From a5efbb1b775afb2f6b29b37d39947c41744bb005 Mon Sep 17 00:00:00 2001 From: Ronan Date: Sat, 26 Apr 2025 21:04:01 +0200 Subject: Added getCanonicalGenericConstraints2 (sorts constraints and allows more generic expressions) (#6787) --- source/slang/slang-ast-synthesis.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/slang/slang-ast-synthesis.cpp') diff --git a/source/slang/slang-ast-synthesis.cpp b/source/slang/slang-ast-synthesis.cpp index 46ba81d16..58c68c369 100644 --- a/source/slang/slang-ast-synthesis.cpp +++ b/source/slang/slang-ast-synthesis.cpp @@ -179,8 +179,7 @@ DeclStmt* ASTSynthesizer::emitVarDeclStmt(Type* type, Name* name, Expr* initVal) varDecl->type.type = type; varDecl->nameAndLoc.name = name; varDecl->initExpr = initVal; - varDecl->parentDecl = scope.m_scope->containerDecl; - varDecl->parentDecl->members.add(varDecl); + scope.m_scope->containerDecl->addMember(varDecl); auto stmt = m_builder->create(); stmt->decl = varDecl; _addStmtToScope(stmt); -- cgit v1.2.3