Skip to content

Commit

Permalink
Fixes #825 - can't write test because web converter uses later versio…
Browse files Browse the repository at this point in the history
…n of library which causes this
  • Loading branch information
GrahamTheCoder committed Feb 6, 2022
1 parent ead15f4 commit fc957c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

### C# -> VB

* Improve snippet detection [#825](https://github.com/icsharpcode/CodeConverter/issues/825)

## [8.4.5] - 2022-01-26

Expand Down
3 changes: 2 additions & 1 deletion CodeConverter/VB/CSToVBConversion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ node is CSSyntax.StatementSyntax ||
public bool MustBeContainedByClass(SyntaxNode node)
{
return node is CSSyntax.BaseMethodDeclarationSyntax || node is CSSyntax.BaseFieldDeclarationSyntax ||
node is CSSyntax.BasePropertyDeclarationSyntax;
node is CSSyntax.BasePropertyDeclarationSyntax ||
node is CSSyntax.GlobalStatementSyntax; //https://github.com/icsharpcode/CodeConverter/issues/825
}

private static bool ParsedAsFieldButCouldBeLocalVariableDeclaration(SyntaxNode node)
Expand Down

0 comments on commit fc957c5

Please # to comment.