File tree Expand file tree Collapse file tree
src/reactive/Reactive.Compiler/Features/Required Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) {
4646 HasRequiredProperties : group . Any ( g => g . HasRequiredProperties ) ,
4747 HasRequiredSuperclass : group . Any ( g => g . HasRequiredSuperclass )
4848 ) )
49- . Where ( y => ! y . TypeSymbol . IsAbstract ) ;
49+ . Where ( y => y . TypeSymbol is { IsAbstract : false , IsStatic : false } ) ;
5050 } ) ;
5151
5252 context . RegisterSourceOutput ( candidates , ( spc , data ) => {
@@ -62,7 +62,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) {
6262
6363 // Non-required properties aren't handled
6464 var attr = symbol ? . GetAttribute < RequiredAttribute > ( ctx . SemanticModel ) ;
65- if ( attr == null ) {
65+ if ( symbol is not { IsStatic : false } || attr == null ) {
6666 return null ;
6767 }
6868
@@ -86,6 +86,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) {
8686 // also rely on this generator, so we won't miss a hierarchy stage
8787 var hasRequiredMembers = symbol . BaseType ?
8888 . GetMembers ( )
89+ . Where ( x => ! x . IsStatic )
8990 . Any ( x => x . GetDerivedAttribute < RequiredAttribute > ( ctx . SemanticModel ) != null )
9091 ?? false ;
9192
You can’t perform that action at this time.
0 commit comments