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 19, 2022
1 parent a7cdcd9 commit 717689b
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 @@ -19,6 +19,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 717689b

Please sign in to comment.