Browse Source

Hide [NullableContext] on accessors

pull/2251/head
Daniel Grunwald 5 years ago
parent
commit
4050d39b28
  1. 3
      ICSharpCode.Decompiler/TypeSystem/Implementation/AttributeListBuilder.cs

3
ICSharpCode.Decompiler/TypeSystem/Implementation/AttributeListBuilder.cs

@ -244,7 +244,8 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation @@ -244,7 +244,8 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation
case "NullableAttribute":
return (options & TypeSystemOptions.NullabilityAnnotations) != 0;
case "NullableContextAttribute":
return (options & TypeSystemOptions.NullabilityAnnotations) != 0 && (target == SymbolKind.TypeDefinition || target == SymbolKind.Method);
return (options & TypeSystemOptions.NullabilityAnnotations) != 0
&& (target == SymbolKind.TypeDefinition || target == SymbolKind.Method || target == SymbolKind.Accessor);
default:
return false;
}

Loading…
Cancel
Save