diff options
Diffstat (limited to 'source/slang/mangle.cpp')
| -rw-r--r-- | source/slang/mangle.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/slang/mangle.cpp b/source/slang/mangle.cpp index b153cb8dd..1ccd32b07 100644 --- a/source/slang/mangle.cpp +++ b/source/slang/mangle.cpp @@ -264,9 +264,11 @@ namespace Slang // Special case: accessors need some way to distinguish themselves // so that a getter/setter/ref-er don't all compile to the same name. - if(declRef.as<GetterDecl>()) emitRaw(context, "Ag"); - if(declRef.as<SetterDecl>()) emitRaw(context, "As"); - if(declRef.as<RefAccessorDecl>()) emitRaw(context, "Ar"); + { + if (declRef.is<GetterDecl>()) emitRaw(context, "Ag"); + if (declRef.is<SetterDecl>()) emitRaw(context, "As"); + if (declRef.is<RefAccessorDecl>()) emitRaw(context, "Ar"); + } // Are we the "inner" declaration beneath a generic decl? if(parentGenericDeclRef && (parentGenericDeclRef.getDecl()->inner.Ptr() == declRef.getDecl())) @@ -294,15 +296,15 @@ namespace Slang UInt genericParameterCount = 0; for( auto mm : getMembers(parentGenericDeclRef) ) { - if(mm.as<GenericTypeParamDecl>()) + if(as<GenericTypeParamDecl>(mm)) { genericParameterCount++; } - else if(mm.as<GenericValueParamDecl>()) + else if(as<GenericValueParamDecl>(mm)) { genericParameterCount++; } - else if(mm.as<GenericTypeConstraintDecl>()) + else if(as<GenericTypeConstraintDecl>(mm)) { genericParameterCount++; } @@ -358,7 +360,7 @@ namespace Slang // Don't print result type for an initializer/constructor, // since it is implicit in the qualified name. - if (!callableDeclRef.as<ConstructorDecl>()) + if (!callableDeclRef.is<ConstructorDecl>()) { emitType(context, GetResultType(callableDeclRef)); } |
