diff --git a/src/Compilers/CSharp/Portable/Symbols/DiscardSymbol.cs b/src/Compilers/CSharp/Portable/Symbols/DiscardSymbol.cs index 2e745465f1d19cb3e8d8d1b0fadebf498eaaf1c9..78fbdef24df2f775b5a6b0d6074c79e3e62f9f3c 100644 --- a/src/Compilers/CSharp/Portable/Symbols/DiscardSymbol.cs +++ b/src/Compilers/CSharp/Portable/Symbols/DiscardSymbol.cs @@ -14,8 +14,8 @@ public DiscardSymbol(TypeSymbol type) } ITypeSymbol IDiscardSymbol.Type => Type; + Nullability IDiscardSymbol.Nullability => Nullability.NotComputed; public TypeSymbol Type { get; } - public Nullability Nullability => Nullability.NotComputed; /// /// Produce a fresh discard symbol for testing. diff --git a/src/Compilers/CSharp/Portable/Symbols/EventSymbol.cs b/src/Compilers/CSharp/Portable/Symbols/EventSymbol.cs index 362c4654c1a7a110b884c46b74a5eee5cf3c36aa..99ea1062d1e7f7ffcb8abcf89fd14d3ebbddd402 100644 --- a/src/Compilers/CSharp/Portable/Symbols/EventSymbol.cs +++ b/src/Compilers/CSharp/Portable/Symbols/EventSymbol.cs @@ -49,8 +49,6 @@ protected override sealed Symbol OriginalSymbolDefinition /// public abstract TypeSymbolWithAnnotations Type { get; } - public Nullability Nullability => Nullability.NotComputed; - /// /// The 'add' accessor of the event. Null only in error scenarios. /// @@ -343,6 +341,8 @@ ITypeSymbol IEventSymbol.Type } } + Nullability IEventSymbol.Nullability => Nullability.NotComputed; + IMethodSymbol IEventSymbol.AddMethod { get diff --git a/src/Compilers/CSharp/Portable/Symbols/FieldSymbol.cs b/src/Compilers/CSharp/Portable/Symbols/FieldSymbol.cs index cf9d880924b1897d4c670215bd1da52946ea0b90..66a7a3d99020dad3918d4e1f6db2a99310d5a5af 100644 --- a/src/Compilers/CSharp/Portable/Symbols/FieldSymbol.cs +++ b/src/Compilers/CSharp/Portable/Symbols/FieldSymbol.cs @@ -58,8 +58,6 @@ public TypeSymbolWithAnnotations Type internal abstract TypeSymbolWithAnnotations GetFieldType(ConsList fieldsBeingBound); - public Nullability Nullability => Nullability.NotComputed; - /// /// If this field serves as a backing variable for an automatically generated /// property or a field-like event, returns that @@ -457,6 +455,8 @@ ITypeSymbol IFieldSymbol.Type } } + Nullability IFieldSymbol.Nullability => Nullability.NotComputed; + ImmutableArray IFieldSymbol.CustomModifiers { get { return this.Type.CustomModifiers; } diff --git a/src/Compilers/CSharp/Portable/Symbols/LocalSymbol.cs b/src/Compilers/CSharp/Portable/Symbols/LocalSymbol.cs index fa207562e30383ce82fbc8aca0bd6c6ea86e55c9..9506b69edfbd72dbb630625fb08c67ad3bc6b163 100644 --- a/src/Compilers/CSharp/Portable/Symbols/LocalSymbol.cs +++ b/src/Compilers/CSharp/Portable/Symbols/LocalSymbol.cs @@ -54,8 +54,6 @@ protected LocalSymbol() get; } - public Nullability Nullability => Nullability.NotComputed; - /// /// WARN WARN WARN: If you access this via the semantic model, things will break (since the initializer may not have been bound). /// @@ -369,6 +367,8 @@ ITypeSymbol ILocalSymbol.Type } } + Nullability ILocalSymbol.Nullability => Nullability.NotComputed; + bool ILocalSymbol.IsFunctionValue { get diff --git a/src/Compilers/CSharp/Portable/Symbols/MethodSymbol.cs b/src/Compilers/CSharp/Portable/Symbols/MethodSymbol.cs index 341424a6ee4cbdfe16233eadc3a16765dcb5c2af..b7405d3d24a3a9aef0da27c5c608bb61822b327c 100644 --- a/src/Compilers/CSharp/Portable/Symbols/MethodSymbol.cs +++ b/src/Compilers/CSharp/Portable/Symbols/MethodSymbol.cs @@ -204,8 +204,6 @@ public bool ReturnsByRefReadonly /// public abstract TypeSymbolWithAnnotations ReturnType { get; } - public Nullability ReturnNullability => Nullability.NotComputed; - /// /// Returns the type arguments that have been substituted for the type parameters. /// If nothing has been substituted for a given type parameter, @@ -213,8 +211,6 @@ public bool ReturnsByRefReadonly /// public abstract ImmutableArray TypeArguments { get; } - public ImmutableArray TypeArgumentsNullabilities => TypeArguments.SelectAsArray(_ => Nullability.NotComputed); - /// /// Get the type parameters on this method. If the method has not generic, /// returns an empty list. @@ -723,8 +719,6 @@ public virtual TypeSymbol ReceiverType } } - public Nullability ReceiverNullability => Nullability.NotComputed; - /// /// If this method is a reduced extension method, returns a type inferred during reduction process for the type parameter. /// @@ -1014,6 +1008,8 @@ ITypeSymbol IMethodSymbol.ReturnType } } + Nullability IMethodSymbol.ReturnNullability => Nullability.NotComputed; + ImmutableArray IMethodSymbol.TypeArguments { get @@ -1022,6 +1018,8 @@ ImmutableArray IMethodSymbol.TypeArguments } } + ImmutableArray IMethodSymbol.TypeArgumentsNullabilities => TypeArguments.SelectAsArray(_ => Nullability.NotComputed); + ImmutableArray IMethodSymbol.TypeParameters { get @@ -1070,6 +1068,8 @@ ITypeSymbol IMethodSymbol.ReceiverType } } + Nullability IMethodSymbol.ReceiverNullability => Nullability.NotComputed; + IMethodSymbol IMethodSymbol.ReducedFrom { get diff --git a/src/Compilers/CSharp/Portable/Symbols/ParameterSymbol.cs b/src/Compilers/CSharp/Portable/Symbols/ParameterSymbol.cs index b63634747f7dfd54e74845e15a1ba1a2b2a08422..dea213ac8306f9df7d13ec3f14103bcd4f1f3d57 100644 --- a/src/Compilers/CSharp/Portable/Symbols/ParameterSymbol.cs +++ b/src/Compilers/CSharp/Portable/Symbols/ParameterSymbol.cs @@ -49,8 +49,6 @@ protected override sealed Symbol OriginalSymbolDefinition /// public abstract TypeSymbolWithAnnotations Type { get; } - public Nullability Nullability => Nullability.NotComputed; - /// /// Determines if the parameter ref, out or neither. /// @@ -426,6 +424,8 @@ ITypeSymbol IParameterSymbol.Type get { return this.Type.TypeSymbol; } } + Nullability IParameterSymbol.Nullability => Nullability.NotComputed; + ImmutableArray IParameterSymbol.CustomModifiers { get { return this.Type.CustomModifiers; } diff --git a/src/Compilers/CSharp/Portable/Symbols/TypeParameterSymbol.cs b/src/Compilers/CSharp/Portable/Symbols/TypeParameterSymbol.cs index be6be309ee5a398bbad6f961f51ced1ae88e3f89..667e56478e350106036c45111b2135f49c349c02 100644 --- a/src/Compilers/CSharp/Portable/Symbols/TypeParameterSymbol.cs +++ b/src/Compilers/CSharp/Portable/Symbols/TypeParameterSymbol.cs @@ -722,7 +722,7 @@ ImmutableArray ITypeParameterSymbol.ConstraintTypes } } - ImmutableArray ITypeParameterSymbol.ConstraintsNullabilities + ImmutableArray ITypeParameterSymbol.ConstraintNullabilities { get => this.ConstraintTypesNoUseSiteDiagnostics.SelectAsArray(c => Nullability.NotComputed); } diff --git a/src/Compilers/Core/Portable/PublicAPI.Unshipped.txt b/src/Compilers/Core/Portable/PublicAPI.Unshipped.txt index b06c350649f6cff2d62ce2044795e52d4cbbee3e..1e1952b9a48d4db8eb9a30d31d9d2189b355f5a4 100644 --- a/src/Compilers/Core/Portable/PublicAPI.Unshipped.txt +++ b/src/Compilers/Core/Portable/PublicAPI.Unshipped.txt @@ -10,7 +10,7 @@ Microsoft.CodeAnalysis.IMethodSymbol.ReturnNullability.get -> Microsoft.CodeAnal Microsoft.CodeAnalysis.IMethodSymbol.TypeArgumentsNullabilities.get -> System.Collections.Immutable.ImmutableArray Microsoft.CodeAnalysis.INamedTypeSymbol.TypeArgumentsNullabilities.get -> System.Collections.Immutable.ImmutableArray Microsoft.CodeAnalysis.IParameterSymbol.Nullability.get -> Microsoft.CodeAnalysis.Nullability -Microsoft.CodeAnalysis.ITypeParameterSymbol.ConstraintsNullabilities.get -> System.Collections.Immutable.ImmutableArray +Microsoft.CodeAnalysis.ITypeParameterSymbol.ConstraintNullabilities.get -> System.Collections.Immutable.ImmutableArray Microsoft.CodeAnalysis.ITypeParameterSymbol.ReferenceTypeConstraintNullability.get -> Microsoft.CodeAnalysis.Nullability Microsoft.CodeAnalysis.ITypeSymbol.IsRefLikeType.get -> bool Microsoft.CodeAnalysis.ITypeSymbol.ToDisplayParts(Microsoft.CodeAnalysis.Nullability topLevelNullability, Microsoft.CodeAnalysis.SymbolDisplayFormat format = null) -> System.Collections.Immutable.ImmutableArray diff --git a/src/Compilers/Core/Portable/Symbols/ITypeParameterSymbol.cs b/src/Compilers/Core/Portable/Symbols/ITypeParameterSymbol.cs index 239ec841cc0260e161e92bff29ab20ead5594380..dc0d525b86a81c70453f6d9de4d060bb5a8e0d5d 100644 --- a/src/Compilers/Core/Portable/Symbols/ITypeParameterSymbol.cs +++ b/src/Compilers/Core/Portable/Symbols/ITypeParameterSymbol.cs @@ -68,7 +68,7 @@ public interface ITypeParameterSymbol : ITypeSymbol ImmutableArray ConstraintTypes { get; } // PROTOTYPE(nullable-api): Document - ImmutableArray ConstraintsNullabilities { get; } + ImmutableArray ConstraintNullabilities { get; } /// /// Get the original definition of this type symbol. If this symbol is derived from another diff --git a/src/Compilers/VisualBasic/Portable/Symbols/TypeParameterSymbol.vb b/src/Compilers/VisualBasic/Portable/Symbols/TypeParameterSymbol.vb index 390d1b830eb933da121230528cc3355d999558fe..0a832e5302ee33bcf46077abf02c69625953e28e 100644 --- a/src/Compilers/VisualBasic/Portable/Symbols/TypeParameterSymbol.vb +++ b/src/Compilers/VisualBasic/Portable/Symbols/TypeParameterSymbol.vb @@ -385,7 +385,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols End Get End Property - Private ReadOnly Property ITypeParameterSymbol_ConstraintsNullabilities As ImmutableArray(Of Nullability) Implements ITypeParameterSymbol.ConstraintsNullabilities + Private ReadOnly Property ITypeParameterSymbol_ConstraintsNullabilities As ImmutableArray(Of Nullability) Implements ITypeParameterSymbol.ConstraintNullabilities Get Return Me.ConstraintTypesNoUseSiteDiagnostics.SelectAsArray(Function(t) Nullability.NotComputed) End Get