Permalink
Browse files

Add reference to _this_ and _base_ keywords in ctor initializer

  • Loading branch information...
1 parent 0647866 commit 8b79ca3d2b40c23aaf3a97cc6f2d12dcaa5fa1ab @Zvirja Zvirja committed Aug 1, 2016
Showing with 9 additions and 0 deletions.
  1. +9 −0 ICSharpCode.Decompiler/Ast/TextTokenWriter.cs
@@ -188,6 +188,15 @@ object GetCurrentDefinition()
public override void WriteKeyword(Role role, string keyword)
{
+ //To make reference for 'this' and 'base' keywords in the ClassName():this() expression
+ if (role == ConstructorInitializer.ThisKeywordRole || role == ConstructorInitializer.BaseKeywordRole) {
+ var reference = GetCurrentMemberReference();
+ if (reference != null) {
+ output.WriteReference(keyword, reference);
+ return;
+ }
+ }
+
output.Write(keyword);
}

0 comments on commit 8b79ca3

Please sign in to comment.