File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,7 +156,11 @@ public override VisualBasicSyntaxNode VisitAttributeArgument(CSSyntax.AttributeA
156156 }
157157 #endregion
158158
159- public override VisualBasicSyntaxNode VisitNamespaceDeclaration ( CSSyntax . NamespaceDeclarationSyntax node )
159+ public override VisualBasicSyntaxNode VisitFileScopedNamespaceDeclaration ( FileScopedNamespaceDeclarationSyntax node ) => ConvertNamespaceDeclaration ( node ) ;
160+
161+ public override VisualBasicSyntaxNode VisitNamespaceDeclaration ( CSSyntax . NamespaceDeclarationSyntax node ) => ConvertNamespaceDeclaration ( node ) ;
162+
163+ private VisualBasicSyntaxNode ConvertNamespaceDeclaration ( BaseNamespaceDeclarationSyntax node )
160164 {
161165 foreach ( var @using in node . Usings )
162166 _importsToConvert . AddRange ( node . Usings ) ;
Original file line number Diff line number Diff line change @@ -66,6 +66,21 @@ End Class
6666End Namespace" ) ;
6767 }
6868
69+ [ Fact ]
70+ public async Task TestClassWithNamespaceStatementAsync ( )
71+ {
72+ await TestConversionCSharpToVisualBasicAsync ( @"namespace Test.@class;
73+
74+ class TestClass<T>
75+ {
76+ }
77+ " , @"Namespace Test.class
78+
79+ Friend Class TestClass(Of T)
80+ End Class
81+ End Namespace" ) ;
82+ }
83+
6984 [ Fact ]
7085 public async Task TestInternalStaticClassAsync ( )
7186 {
You can’t perform that action at this time.
0 commit comments