From f28f67d988158d6c46f7ffe967152f98d32a37b2 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 30 Jun 2025 14:32:50 -0700 Subject: Add MLP training examples. (#7550) * Add MLP training examples. * Formatting fix. * Fix. * Improve documentation on coopvector. * Improve doc. * Update doc. * Fix typo. * Cleanup shader. * Cleanup. * Fix test. * Fix type check recursion. * Fix. * Fix. * Fix override check. --- source/slang/slang-check-expr.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/slang/slang-check-expr.cpp') diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp index 306687bd8..b90081af8 100644 --- a/source/slang/slang-check-expr.cpp +++ b/source/slang/slang-check-expr.cpp @@ -682,6 +682,8 @@ Expr* SemanticsVisitor::maybeUseSynthesizedDeclForLookupResult( auto typeDef = m_astBuilder->create(); typeDef->nameAndLoc.name = getName("Differential"); typeDef->parentDecl = structDecl; + addVisibilityModifier(structDecl, getDeclVisibility(parent)); + addVisibilityModifier(typeDef, getDeclVisibility(parent)); auto synthDeclRef = createDefaultSubstitutionsIfNeeded(m_astBuilder, this, makeDeclRef(structDecl)); @@ -714,6 +716,7 @@ Expr* SemanticsVisitor::maybeUseSynthesizedDeclForLookupResult( typeDef->type.type = calcThisType(subType->getDeclRef().getDecl()->getDefaultDeclRef()); + addVisibilityModifier(typeDef, getDeclVisibility(parent)); synthesizedDecl = parent; parent->addDirectMemberDecl(typeDef); @@ -2085,7 +2088,7 @@ IntVal* SemanticsVisitor::tryConstantFoldDeclRef( // to not allow such cases. // // Note that float-to-inst casts for non-`IntVal`s are allowed. - if (!isScalarIntegerType(decl->getType())) + if (!isValidCompileTimeConstantType(decl->getType())) { getSink()->diagnose(declRef, Diagnostics::intValFromNonIntSpecConstEncountered); return nullptr; -- cgit v1.2.3