From 9dfd5244ad2953753535e82acd05e72e5ab2bc5f Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 16 May 2025 10:42:11 -0700 Subject: Allow lambda exprs without captures to coerce to `functype`. (#7129) --- source/slang/slang-ast-synthesis.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (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 c7291f526..5f7b527e2 100644 --- a/source/slang/slang-ast-synthesis.cpp +++ b/source/slang/slang-ast-synthesis.cpp @@ -168,6 +168,16 @@ Expr* ASTSynthesizer::emitMemberExpr(Type* type, Name* name) return rs; } +Expr* ASTSynthesizer::emitMemberExpr(QualType exprType, Expr* base, DeclRef declRef) +{ + auto rs = m_builder->create(); + rs->baseExpression = base; + rs->declRef = declRef; + rs->type = exprType; + rs->checked = base->checked; + return rs; +} + Expr* ASTSynthesizer::emitIndexExpr(Expr* base, Expr* index) { auto rs = m_builder->create(); -- cgit v1.2.3