File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
source/modules/soul_core/compiler Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1879,7 +1879,6 @@ struct ResolutionPass final
1879
1879
return instance;
1880
1880
1881
1881
auto specialisationArgs = AST::CommaSeparatedList::getAsExpressionList (instance.specialisationArgs );
1882
- auto numArgs = specialisationArgs.size ();
1883
1882
auto target = pool_ref<AST::ProcessorBase> (*p);
1884
1883
1885
1884
if (! validateSpecialisationArgs (specialisationArgs, target->specialisationParams ))
@@ -1898,18 +1897,20 @@ struct ResolutionPass final
1898
1897
return instance;
1899
1898
}
1900
1899
1901
- if (target->owningInstance != nullptr || numArgs != 0 )
1900
+ bool requiresSpecialisation = ! target->specialisationParams .empty ();
1901
+
1902
+ if (target->owningInstance != nullptr || requiresSpecialisation)
1902
1903
{
1903
1904
auto nameRoot = target->name .toString ();
1904
1905
1905
- if (numArgs != 0 )
1906
+ if (requiresSpecialisation )
1906
1907
nameRoot = TokenisedPathString::join (nameRoot,
1907
1908
" _for_" + makeSafeIdentifierName (choc::text::replace (graph.getFullyQualifiedPath ().toString (), " :" , " _" )
1908
1909
+ " _" + instance.instanceName ->toString ()));
1909
1910
auto & ns = target->getNamespace ();
1910
1911
target = *cast<AST::ProcessorBase> (target->createClone (allocator, ns, ns.makeUniqueName (nameRoot)));
1911
1912
1912
- if (numArgs != 0 )
1913
+ if (requiresSpecialisation )
1913
1914
{
1914
1915
auto oldCloneFn = target->createClone ;
1915
1916
You can’t perform that action at this time.
0 commit comments