summaryrefslogtreecommitdiff
path: root/source/slang/slang-ast-synthesis.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-05-16 10:42:11 -0700
committerGitHub <noreply@github.com>2025-05-16 10:42:11 -0700
commit9dfd5244ad2953753535e82acd05e72e5ab2bc5f (patch)
tree0f7c8a0bf4ea3dd25348e1d1ac8e5bfcfd8c9724 /source/slang/slang-ast-synthesis.cpp
parent1fd7b2296d8360c245a0c732e7f842876533f92a (diff)
Allow lambda exprs without captures to coerce to `functype`. (#7129)
Diffstat (limited to 'source/slang/slang-ast-synthesis.cpp')
-rw-r--r--source/slang/slang-ast-synthesis.cpp10
1 files changed, 10 insertions, 0 deletions
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<Decl> declRef)
+{
+ auto rs = m_builder->create<MemberExpr>();
+ 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<IndexExpr>();