Skip to content

Commit

Permalink
Add reference to _this_ and _base_ keywords in ctor initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
zvirja committed Aug 1, 2016
1 parent 0647866 commit 8b79ca3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ICSharpCode.Decompiler/Ast/TextTokenWriter.cs
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8b79ca3

Please sign in to comment.