File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ protected override void ExtractInitializers(TextWriter trapFile)
6060 // Do not extract initializers for constructed types.
6161 // Extract initializers for constructors with a body, primary constructors
6262 // and default constructors for classes and structs declared in source code.
63- if ( Block is null && ExpressionBody is null && ! MakeSynthetic )
63+ if ( Block is null && ExpressionBody is null && ! MakeSynthetic || Context . OnlyScaffold )
6464 {
6565 return ;
6666 }
@@ -113,6 +113,7 @@ protected override void ExtractInitializers(TextWriter trapFile)
113113 }
114114
115115 var baseConstructorTarget = Create ( Context , baseConstructor ) ;
116+
116117 var info = new ExpressionInfo ( Context ,
117118 AnnotatedTypeSymbol . CreateNotAnnotated ( baseType ) ,
118119 Location ,
Original file line number Diff line number Diff line change @@ -34,11 +34,6 @@ internal Expression(IExpressionInfo info, bool shouldPopulate = true)
3434
3535 protected sealed override void Populate ( TextWriter trapFile )
3636 {
37- if ( Context . OnlyScaffold )
38- {
39- return ;
40- }
41-
4237 var type = Type . HasValue ? Entities . Type . Create ( Context , Type . Value ) : NullType . Create ( Context ) ;
4338 trapFile . expressions ( this , Kind , type . TypeRef ) ;
4439 if ( info . Parent . IsTopLevelParent )
You can’t perform that action at this time.
0 commit comments