File tree 2 files changed +19
-4
lines changed
src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration
2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ public enum Stage
91
91
/// </summary>
92
92
public StubCodeContext ? ParentContext { get ; protected init ; }
93
93
94
- public const string GeneratedNativeIdentifierSuffix = "_gen_native " ;
94
+ public const string GeneratedNativeIdentifierSuffix = "_native " ;
95
95
96
96
/// <summary>
97
97
/// Get managed and native instance identifiers for the <paramref name="info"/>
Original file line number Diff line number Diff line change @@ -19,16 +19,31 @@ private static FixedStatementSyntax AddStatementWithoutEmptyStatements(this Fixe
19
19
{
20
20
return fixedStatement . WithStatement ( childStatement ) ;
21
21
}
22
+
23
+ BlockSyntax block ;
22
24
if ( fixedStatement . Statement . IsKind ( SyntaxKind . Block ) )
23
25
{
24
- var block = ( BlockSyntax ) fixedStatement . Statement ;
26
+ block = ( BlockSyntax ) fixedStatement . Statement ;
25
27
if ( block . Statements . Count == 0 )
26
28
{
27
29
return fixedStatement . WithStatement ( childStatement ) ;
28
30
}
29
- return fixedStatement . WithStatement ( block . AddStatements ( childStatement ) ) ;
30
31
}
31
- return fixedStatement . WithStatement ( SyntaxFactory . Block ( fixedStatement . Statement , childStatement ) ) ;
32
+ else
33
+ {
34
+ block = SyntaxFactory . Block ( fixedStatement . Statement ) ;
35
+ }
36
+
37
+ if ( childStatement . IsKind ( SyntaxKind . Block ) )
38
+ {
39
+ block = block . WithStatements ( block . Statements . AddRange ( ( ( BlockSyntax ) childStatement ) . Statements ) ) ;
40
+ }
41
+ else
42
+ {
43
+ block = block . AddStatements ( childStatement ) ;
44
+ }
45
+
46
+ return fixedStatement . WithStatement ( block ) ;
32
47
}
33
48
34
49
public static StatementSyntax NestFixedStatements ( this ImmutableArray < FixedStatementSyntax > fixedStatements , StatementSyntax innerStatement )
You can’t perform that action at this time.
0 commit comments