File tree Expand file tree Collapse file tree
test/TestCases/napi-dotnet Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -475,7 +475,8 @@ private void ExportType(
475475 $ "{ nameof ( JSPropertyAttributes ) } .{ nameof ( JSPropertyAttributes . Enumerable ) } ";
476476
477477 // Declare nested types first, so they can be exported as static properties of this type.
478- foreach ( INamedTypeSymbol nestedType in type . GetTypeMembers ( ) )
478+ foreach ( INamedTypeSymbol nestedType in type . GetTypeMembers ( )
479+ . Where ( ( t ) => t . DeclaredAccessibility == Accessibility . Public ) )
479480 {
480481 ExportType ( ref s , nestedType , GetExportName ( nestedType ) ) ;
481482 }
Original file line number Diff line number Diff line change @@ -199,6 +199,11 @@ public NestedClass(string value)
199199
200200 public string Value { get ; set ; }
201201 }
202+
203+ // Non-public nested types should not be exported.
204+ internal class PrivateNestedClass
205+ {
206+ }
202207}
203208
204209[ JSExport ]
You can’t perform that action at this time.
0 commit comments