summaryrefslogtreecommitdiff
path: root/BCT/BytecodeTranslator/Heap.cs
diff options
context:
space:
mode:
Diffstat (limited to 'BCT/BytecodeTranslator/Heap.cs')
-rw-r--r--BCT/BytecodeTranslator/Heap.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/BCT/BytecodeTranslator/Heap.cs b/BCT/BytecodeTranslator/Heap.cs
index 664db230..751d8baa 100644
--- a/BCT/BytecodeTranslator/Heap.cs
+++ b/BCT/BytecodeTranslator/Heap.cs
@@ -207,6 +207,9 @@ namespace BytecodeTranslator {
Bpl.Variable v;
string fieldname = TypeHelper.GetTypeName(field.ContainingType) + "." + field.Name.Value;
fieldname = TranslationHelper.TurnStringIntoValidIdentifier(fieldname);
+ // Need to append something to the name to avoid name clashes with other members (of a different
+ // type) that have the same name.
+ fieldname += "$field";
Bpl.IToken tok = field.Token();
if (field.IsStatic) {