Browse Source

Add reference to _this_ and _base_ keywords in ctor initializer

pull/743/head
Alex Povar 9 years ago
parent
commit
8b79ca3d2b
  1. 9
      ICSharpCode.Decompiler/Ast/TextTokenWriter.cs

9
ICSharpCode.Decompiler/Ast/TextTokenWriter.cs

@ -188,6 +188,15 @@ namespace ICSharpCode.Decompiler.Ast @@ -188,6 +188,15 @@ namespace ICSharpCode.Decompiler.Ast
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);
}

Loading…
Cancel
Save