summaryrefslogtreecommitdiffstats
path: root/source/slang/mangle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/mangle.cpp')
-rw-r--r--source/slang/mangle.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/mangle.cpp b/source/slang/mangle.cpp
index d3e2f833f..dc2738d8f 100644
--- a/source/slang/mangle.cpp
+++ b/source/slang/mangle.cpp
@@ -325,6 +325,12 @@ namespace Slang
emitName(context, declRef.GetName());
+ // 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");
+
// Are we the "inner" declaration beneath a generic decl?
if(parentGenericDeclRef && (parentGenericDeclRef.getDecl()->inner.Ptr() == declRef.getDecl()))
{