diff --git a/src/Compilers/Core/Portable/Compilation/Extensions.cs b/src/Compilers/Core/Portable/Compilation/Extensions.cs
index b0b44eb39e329..51640885479bb 100644
--- a/src/Compilers/Core/Portable/Compilation/Extensions.cs
+++ b/src/Compilers/Core/Portable/Compilation/Extensions.cs
@@ -24,6 +24,12 @@ public static class ModelExtensions
return semanticModel.GetSymbolInfo(node, cancellationToken);
}
+ // If there is no single symbol, return will be the same as GetSymbolInfoWithNullability
+ public static SymbolInfo GetSymbolInfoWithNullability(this SemanticModel semanticModel, SyntaxNode, CancellationToken ct = default)
+ {
+ throw new NotImplementedException();
+ }
+
///
/// Binds the node in the context of the specified location and get semantic information
/// such as type, symbols and diagnostics. This method is used to get semantic information
@@ -60,6 +66,11 @@ public static SymbolInfo GetSpeculativeSymbolInfo(this SemanticModel semanticMod
return semanticModel.GetTypeInfo(node, cancellationToken);
}
+ public static TypeInfo GetTypeInfoWithNullability(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken = default)
+ {
+ throw new NotImplementedException();
+ }
+
///
/// If "nameSyntax" resolves to an alias name, return the IAliasSymbol corresponding
/// to A. Otherwise return null.
@@ -135,6 +146,46 @@ public static TypeInfo GetSpeculativeTypeInfo(this SemanticModel semanticModel,
return semanticModel.GetDeclaredSymbolForNode(declaration, cancellationToken);
}
+ public static TypeInfo GetTypeWithNullability(this SemanticModel semanticModel, IDiscardSymbol discard, CancellationToken ct = default)
+ {
+ throw new NotImplementedException();
+ }
+
+ public static TypeInfo GetTypeWithNullability(this SemanticModel semanticModel, IEventSymbol eventSymbol, CancellationToken ct = default)
+ {
+ throw new NotImplementedException();
+ }
+
+ public static TypeInfo GetTypeWithNullability(this SemanticModel semanticModel, IFieldSymbol field, CancellationToken ct = default)
+ {
+ throw new NotImplementedException();
+ }
+
+ public static TypeInfo GetTypeWithNullability(this SemanticModel semanticModel, ILocalSymbol local, CancellationToken ct = default)
+ {
+ throw new NotImplementedException();
+ }
+
+ public static TypeInfo GetReturnTypeWithNullability(this SemanticModel semanticModel, IMethodSymbol method, CancellationToken ct = default)
+ {
+ throw new NotImplementedException();
+ }
+
+ public static ImmutableArray GetTypeParametersWithNullability(this SemanticModel semanticModel, IMethodSymbol method, CancellationToken ct = default)
+ {
+ throw new NotImplementedException();
+ }
+
+ public static TypeInfo GetReceiverTypeWithNullability(this SemanticModel semanticModel, IMethodSymbol method, CancellationToken ct = default)
+ {
+ throw new NotImplementedException();
+ }
+
+ public static TypeInfo GetTypeWithNullability(this SemanticModel semanticModel, IParameterSymbol local, CancellationToken ct = default)
+ {
+ throw new NotImplementedException();
+ }
+
///
/// Gets a list of method or indexed property symbols for a syntax node.
///
diff --git a/src/Compilers/Core/Portable/Compilation/TypeInfo.cs b/src/Compilers/Core/Portable/Compilation/TypeInfo.cs
index b855e0ac0a213..6045d57e2f049 100644
--- a/src/Compilers/Core/Portable/Compilation/TypeInfo.cs
+++ b/src/Compilers/Core/Portable/Compilation/TypeInfo.cs
@@ -35,11 +35,13 @@ public struct TypeInfo : IEquatable
///
public Nullability ConvertedNullability { get; }
- internal TypeInfo(ITypeSymbol type, ITypeSymbol convertedType)
+ internal TypeInfo(ITypeSymbol type, ITypeSymbol convertedType, Nullability nullability = Nullability.NotComputed, Nullability convertedNullability = Nullability.NotComputed)
: this()
{
this.Type = type;
this.ConvertedType = convertedType;
+ this.Nullability = nullability;
+ this.ConvertedNullability = convertedNullability;
}
public bool Equals(TypeInfo other)
diff --git a/src/Compilers/Core/Portable/PublicAPI.Unshipped.txt b/src/Compilers/Core/Portable/PublicAPI.Unshipped.txt
index 6ebd0d08919bf..96bf7f861ceb1 100644
--- a/src/Compilers/Core/Portable/PublicAPI.Unshipped.txt
+++ b/src/Compilers/Core/Portable/PublicAPI.Unshipped.txt
@@ -30,11 +30,17 @@ Microsoft.CodeAnalysis.ISymbol.ToDisplayString(Microsoft.CodeAnalysis.Nullabilit
Microsoft.CodeAnalysis.ISymbol.ToMinimalDisplayParts(Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, Microsoft.CodeAnalysis.Nullability nullability, Microsoft.CodeAnalysis.SymbolDisplayFormat format = null) -> System.Collections.Immutable.ImmutableArray
Microsoft.CodeAnalysis.ISymbol.ToMinimalDisplayString(Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, Microsoft.CodeAnalysis.Nullability nullability, Microsoft.CodeAnalysis.SymbolDisplayFormat format = null) -> string
Microsoft.CodeAnalysis.ITypeParameterSymbol.ConstraintsNullability.get -> System.Collections.Immutable.ImmutableArray
+Microsoft.CodeAnalysis.ITypeParameterSymbol.ReferenceTypeConstraintNullability.get -> Microsoft.CodeAnalysis.Nullability
+Microsoft.CodeAnalysis.ITypeSymbol.ToDisplayParts(Microsoft.CodeAnalysis.Nullability nullability, Microsoft.CodeAnalysis.SymbolDisplayFormat format = null) -> System.Collections.Immutable.ImmutableArray
+Microsoft.CodeAnalysis.ITypeSymbol.ToDisplayString(Microsoft.CodeAnalysis.Nullability nullability, Microsoft.CodeAnalysis.SymbolDisplayFormat format = null) -> string
+Microsoft.CodeAnalysis.ITypeSymbol.ToMinimalDisplayParts(Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, Microsoft.CodeAnalysis.Nullability nullability, Microsoft.CodeAnalysis.SymbolDisplayFormat format = null) -> System.Collections.Immutable.ImmutableArray
+Microsoft.CodeAnalysis.ITypeSymbol.ToMinimalDisplayString(Microsoft.CodeAnalysis.SemanticModel semanticModel, int position, Microsoft.CodeAnalysis.Nullability nullability, Microsoft.CodeAnalysis.SymbolDisplayFormat format = null) -> string
Microsoft.CodeAnalysis.Nullability
-Microsoft.CodeAnalysis.Nullability.MaybeNull = 3 -> Microsoft.CodeAnalysis.Nullability
-Microsoft.CodeAnalysis.Nullability.NonNull = 2 -> Microsoft.CodeAnalysis.Nullability
+Microsoft.CodeAnalysis.Nullability.MaybeNull = 4 -> Microsoft.CodeAnalysis.Nullability
+Microsoft.CodeAnalysis.Nullability.NonNull = 3 -> Microsoft.CodeAnalysis.Nullability
Microsoft.CodeAnalysis.Nullability.NotApplicable = 0 -> Microsoft.CodeAnalysis.Nullability
-Microsoft.CodeAnalysis.Nullability.Unknown = 1 -> Microsoft.CodeAnalysis.Nullability
+Microsoft.CodeAnalysis.Nullability.NotComputed = 1 -> Microsoft.CodeAnalysis.Nullability
+Microsoft.CodeAnalysis.Nullability.Unknown = 2 -> Microsoft.CodeAnalysis.Nullability
Microsoft.CodeAnalysis.OperationKind.SuppressNullableWarning = 97 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.Operations.CommonConversion.IsImplicit.get -> bool
Microsoft.CodeAnalysis.Operations.ISuppressNullableWarningOperation
@@ -150,6 +156,13 @@ static Microsoft.CodeAnalysis.FlowAnalysis.ControlFlowGraph.Create(Microsoft.Cod
static Microsoft.CodeAnalysis.FlowAnalysis.ControlFlowGraph.Create(Microsoft.CodeAnalysis.Operations.IParameterInitializerOperation initializer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.FlowAnalysis.ControlFlowGraph
static Microsoft.CodeAnalysis.FlowAnalysis.ControlFlowGraph.Create(Microsoft.CodeAnalysis.Operations.IPropertyInitializerOperation initializer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.FlowAnalysis.ControlFlowGraph
static Microsoft.CodeAnalysis.FlowAnalysis.ControlFlowGraph.Create(Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.SemanticModel semanticModel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.FlowAnalysis.ControlFlowGraph
+static Microsoft.CodeAnalysis.ModelExtensions.GetReturnTypeWithNullability(this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.IMethodSymbol method, System.Threading.CancellationToken ct = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.TypeInfo
+static Microsoft.CodeAnalysis.ModelExtensions.GetSymbolInfoWithNullability(this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.SyntaxNode , System.Threading.CancellationToken ct = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.SymbolInfo
+static Microsoft.CodeAnalysis.ModelExtensions.GetTypeInfoWithNullability(this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.SyntaxNode node, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.TypeInfo
+static Microsoft.CodeAnalysis.ModelExtensions.GetTypeWithNullability(this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.IEventSymbol eventSymbol, System.Threading.CancellationToken ct = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.TypeInfo
+static Microsoft.CodeAnalysis.ModelExtensions.GetTypeWithNullability(this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.IFieldSymbol field, System.Threading.CancellationToken ct = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.TypeInfo
+static Microsoft.CodeAnalysis.ModelExtensions.GetTypeWithNullability(this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.ILocalSymbol local, System.Threading.CancellationToken ct = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.TypeInfo
+static Microsoft.CodeAnalysis.ModelExtensions.GetTypeWithNullability(this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.IParameterSymbol local, System.Threading.CancellationToken ct = default(System.Threading.CancellationToken)) -> Microsoft.CodeAnalysis.TypeInfo
virtual Microsoft.CodeAnalysis.Operations.OperationVisitor.VisitCaughtException(Microsoft.CodeAnalysis.FlowAnalysis.ICaughtExceptionOperation operation) -> void
virtual Microsoft.CodeAnalysis.Operations.OperationVisitor.VisitFlowCapture(Microsoft.CodeAnalysis.FlowAnalysis.IFlowCaptureOperation operation) -> void
virtual Microsoft.CodeAnalysis.Operations.OperationVisitor.VisitFlowCaptureReference(Microsoft.CodeAnalysis.FlowAnalysis.IFlowCaptureReferenceOperation operation) -> void
diff --git a/src/Compilers/Core/Portable/Symbols/IDiscardSymbol.cs b/src/Compilers/Core/Portable/Symbols/IDiscardSymbol.cs
index 3b494d9d5d276..4063c1bafd72c 100644
--- a/src/Compilers/Core/Portable/Symbols/IDiscardSymbol.cs
+++ b/src/Compilers/Core/Portable/Symbols/IDiscardSymbol.cs
@@ -14,10 +14,5 @@ public interface IDiscardSymbol : ISymbol
/// The type of the discarded value.
///
ITypeSymbol Type { get; }
-
- ///
- /// The nullability of the discarded value.
- ///
- Nullability Nullability { get; }
}
}
diff --git a/src/Compilers/Core/Portable/Symbols/IEventSymbol.cs b/src/Compilers/Core/Portable/Symbols/IEventSymbol.cs
index 6344ee6ada2e9..90209caf9704f 100644
--- a/src/Compilers/Core/Portable/Symbols/IEventSymbol.cs
+++ b/src/Compilers/Core/Portable/Symbols/IEventSymbol.cs
@@ -19,11 +19,6 @@ public interface IEventSymbol : ISymbol
///
ITypeSymbol Type { get; }
- ///
- /// The declareted nullability of the this event.
- ///
- Nullability DeclaredNullability { get; }
-
///
/// Returns true if the event is a WinRT type event.
///
diff --git a/src/Compilers/Core/Portable/Symbols/IFieldSymbol.cs b/src/Compilers/Core/Portable/Symbols/IFieldSymbol.cs
index 72fa048e5f40e..2d4d2cc66283e 100644
--- a/src/Compilers/Core/Portable/Symbols/IFieldSymbol.cs
+++ b/src/Compilers/Core/Portable/Symbols/IFieldSymbol.cs
@@ -44,11 +44,6 @@ public interface IFieldSymbol : ISymbol
///
ITypeSymbol Type { get; }
- ///
- /// The declared nullability of this field.
- ///
- Nullability DeclaredNullability { get; }
-
///
/// Returns false if the field wasn't declared as "const", or constant value was omitted or erroneous.
/// True otherwise.
diff --git a/src/Compilers/Core/Portable/Symbols/ILocalSymbol.cs b/src/Compilers/Core/Portable/Symbols/ILocalSymbol.cs
index 07a012a85066f..1c70f2c1ed725 100644
--- a/src/Compilers/Core/Portable/Symbols/ILocalSymbol.cs
+++ b/src/Compilers/Core/Portable/Symbols/ILocalSymbol.cs
@@ -16,12 +16,6 @@ public interface ILocalSymbol : ISymbol
///
ITypeSymbol Type { get; }
- ///
- /// The declared nullability of this local. If the local's type was inferred (i.e. via var
), then
- /// this declared nullability is inferred from the expression that initialized the local.
- ///
- Nullability DeclaredNullability { get; }
-
///
/// Returns true if this local variable was declared as "const" (i.e. is a constant declaration).
/// Also returns true for an enum member.
diff --git a/src/Compilers/Core/Portable/Symbols/IMethodSymbol.cs b/src/Compilers/Core/Portable/Symbols/IMethodSymbol.cs
index 05c9f2f9d6765..85043194a20cb 100644
--- a/src/Compilers/Core/Portable/Symbols/IMethodSymbol.cs
+++ b/src/Compilers/Core/Portable/Symbols/IMethodSymbol.cs
@@ -90,11 +90,6 @@ public interface IMethodSymbol : ISymbol
///
ITypeSymbol ReturnType { get; }
- ///
- /// Gets the declared nullability of the return type of the method.
- ///
- Nullability ReturnNullability { get; }
-
///
/// Returns the type arguments that have been substituted for the type parameters.
/// If nothing has been substituted for a given type parameter,
@@ -102,12 +97,6 @@ public interface IMethodSymbol : ISymbol
///
ImmutableArray TypeArguments { get; }
- ///
- /// Returns the nullability of the type arguments that have been substituted for the
- /// type paramters.
- ///
- ImmutableArray TypeArgumentsNullability { get; }
-
///
/// Get the type parameters on this method. If the method has not generic,
/// returns an empty list.
diff --git a/src/Compilers/Core/Portable/Symbols/IParameterSymbol.cs b/src/Compilers/Core/Portable/Symbols/IParameterSymbol.cs
index 8e27c30d2c9ea..10b2937f2187b 100644
--- a/src/Compilers/Core/Portable/Symbols/IParameterSymbol.cs
+++ b/src/Compilers/Core/Portable/Symbols/IParameterSymbol.cs
@@ -40,11 +40,6 @@ public interface IParameterSymbol : ISymbol
///
ITypeSymbol Type { get; }
- ///
- /// Gets the declared nullability of the parameter
- ///
- Nullability DeclaredNullability { get; }
-
///
/// Custom modifiers associated with the parameter type, or an empty array if there are none.
///
diff --git a/src/Compilers/Core/Portable/Symbols/IPropertySymbol.cs b/src/Compilers/Core/Portable/Symbols/IPropertySymbol.cs
index 1c978cf28d3eb..1b09c8cf21dec 100644
--- a/src/Compilers/Core/Portable/Symbols/IPropertySymbol.cs
+++ b/src/Compilers/Core/Portable/Symbols/IPropertySymbol.cs
@@ -55,11 +55,6 @@ public interface IPropertySymbol : ISymbol
///
ITypeSymbol Type { get; }
- ///
- /// Gets the declared nullability of the property
- ///
- Nullability DeclaredNullability { get; }
-
///
/// The parameters of this property. If this property has no parameters, returns
/// an empty list. Parameters are only present on indexers, or on some properties
diff --git a/src/Compilers/Core/Portable/Symbols/ISymbol.cs b/src/Compilers/Core/Portable/Symbols/ISymbol.cs
index a6d6e2dc26fa8..dbdf1f831b57e 100644
--- a/src/Compilers/Core/Portable/Symbols/ISymbol.cs
+++ b/src/Compilers/Core/Portable/Symbols/ISymbol.cs
@@ -213,14 +213,6 @@ public interface ISymbol : IEquatable
/// A formatted string representation of the symbol.
string ToDisplayString(SymbolDisplayFormat format = null);
- ///
- /// Converts the symbol to a string representation with given nullability.
- ///
- /// The nullability to use for the symbol.
- /// Format or null for the default.
- /// A formatted string representation of the symbol.
- string ToDisplayString(Nullability nullability, SymbolDisplayFormat format = null);
-
///
/// Convert a symbol to an array of string parts, each of which has a kind. Useful for
/// colorizing the display string.
@@ -230,16 +222,6 @@ public interface ISymbol : IEquatable
/// A read-only array of string parts.
ImmutableArray ToDisplayParts(SymbolDisplayFormat format = null);
- ///
- /// Convert a symbol to an array of string parts, each of which has a kind, with a given
- /// nullability. Useful for colorizing the display string.
- ///
- /// The nullability to use for formatting.
- /// Formatting rules - null implies
- /// SymbolDisplayFormat.ErrorMessageFormat.
- /// A read-only array of string parts.
- ImmutableArray ToDisplayParts(Nullability nullability, SymbolDisplayFormat format = null);
-
///
/// Convert a symbol to a string that can be displayed to the user. May be tailored to a
/// specific location in the source code.
@@ -255,22 +237,6 @@ string ToMinimalDisplayString(
int position,
SymbolDisplayFormat format = null);
- ///
- /// Convert a symbol to a string that can be displayed to the user. May be tailored to a
- /// specific location in the source code.
- ///
- /// Binding information (for determining names appropriate to
- /// the context).
- /// A position in the source code (context).
- /// The nullability to use in formatting.
- /// Formatting rules - null implies
- /// A formatted string that can be displayed to the user.
- string ToMinimalDisplayString(
- SemanticModel semanticModel,
- int position,
- Nullability nullability,
- SymbolDisplayFormat format = null);
-
///
/// Convert a symbol to an array of string parts, each of which has a kind. May be tailored
/// to a specific location in the source code. Useful for colorizing the display string.
@@ -286,24 +252,6 @@ ImmutableArray ToMinimalDisplayParts(
int position,
SymbolDisplayFormat format = null);
- ///
- /// Convert a symbol to an array of string parts, each of which has a kind, including
- /// nullability. May be tailored to a specific location in the source code. Useful
- /// for colorizing the display string.
- ///
- /// Binding information (for determining names appropriate to
- /// the context).
- /// A position in the source code (context).
- /// The nullability to use in formatting.
- /// Formatting rules - null implies
- /// SymbolDisplayFormat.MinimallyQualifiedFormat.
- /// A read-only array of string parts.
- ImmutableArray ToMinimalDisplayParts(
- SemanticModel semanticModel,
- int position,
- Nullability nullability,
- SymbolDisplayFormat format = null);
-
///
/// Indicates that this symbol uses metadata that cannot be supported by the language.
///
diff --git a/src/Compilers/Core/Portable/Symbols/ITypeParameterSymbol.cs b/src/Compilers/Core/Portable/Symbols/ITypeParameterSymbol.cs
index 847038a16b62c..852fe0f585322 100644
--- a/src/Compilers/Core/Portable/Symbols/ITypeParameterSymbol.cs
+++ b/src/Compilers/Core/Portable/Symbols/ITypeParameterSymbol.cs
@@ -45,6 +45,11 @@ public interface ITypeParameterSymbol : ITypeSymbol
///
bool HasReferenceTypeConstraint { get; }
+ ///
+ /// if is false.
+ ///
+ Nullability ReferenceTypeConstraintNullability { get; }
+
///
/// True if the value type constraint (struct) was specified for the type parameter.
///
diff --git a/src/Compilers/Core/Portable/Symbols/ITypeSymbol.cs b/src/Compilers/Core/Portable/Symbols/ITypeSymbol.cs
index 96c7b0ec99705..5f2ed513c70ee 100644
--- a/src/Compilers/Core/Portable/Symbols/ITypeSymbol.cs
+++ b/src/Compilers/Core/Portable/Symbols/ITypeSymbol.cs
@@ -94,6 +94,59 @@ public interface ITypeSymbol : INamespaceOrTypeSymbol
/// Must be a non-null interface property, method, or event.
///
ISymbol FindImplementationForInterfaceMember(ISymbol interfaceMember);
+
+ ///
+ /// Converts the symbol to a string representation with given nullability.
+ ///
+ /// The nullability to use for the symbol.
+ /// Format or null for the default.
+ /// A formatted string representation of the symbol.
+ string ToDisplayString(Nullability nullability, SymbolDisplayFormat format = null);
+
+ ///
+ /// Convert a symbol to an array of string parts, each of which has a kind, with a given
+ /// nullability. Useful for colorizing the display string.
+ ///
+ /// The nullability to use for formatting.
+ /// Formatting rules - null implies
+ /// SymbolDisplayFormat.ErrorMessageFormat.
+ /// A read-only array of string parts.
+ ImmutableArray ToDisplayParts(Nullability nullability, SymbolDisplayFormat format = null);
+
+ ///
+ /// Convert a symbol to a string that can be displayed to the user. May be tailored to a
+ /// specific location in the source code.
+ ///
+ /// Binding information (for determining names appropriate to
+ /// the context).
+ /// A position in the source code (context).
+ /// The nullability to use in formatting.
+ /// Formatting rules - null implies
+ /// A formatted string that can be displayed to the user.
+ string ToMinimalDisplayString(
+ SemanticModel semanticModel,
+ int position,
+ Nullability nullability,
+ SymbolDisplayFormat format = null);
+
+ ///
+ /// Convert a symbol to an array of string parts, each of which has a kind, including
+ /// nullability. May be tailored to a specific location in the source code. Useful
+ /// for colorizing the display string.
+ ///
+ /// Binding information (for determining names appropriate to
+ /// the context).
+ /// A position in the source code (context).
+ /// The nullability to use in formatting.
+ /// Formatting rules - null implies
+ /// SymbolDisplayFormat.MinimallyQualifiedFormat.
+ /// A read-only array of string parts.
+ ImmutableArray ToMinimalDisplayParts(
+ SemanticModel semanticModel,
+ int position,
+ Nullability nullability,
+ SymbolDisplayFormat format = null);
+
}
// Intentionally not extension methods. We don't want them ever be called for symbol classes
diff --git a/src/Compilers/Core/Portable/Symbols/Nullability.cs b/src/Compilers/Core/Portable/Symbols/Nullability.cs
index 792b1c3a82645..bb6301b433bfa 100644
--- a/src/Compilers/Core/Portable/Symbols/Nullability.cs
+++ b/src/Compilers/Core/Portable/Symbols/Nullability.cs
@@ -79,6 +79,13 @@ public enum Nullability
///
NotApplicable = 0,
///
+ /// The given has inferred nullability that has not yet been
+ /// computed.
+ ///
+ // PROTOTYPE(NullableReferenceTypes): Potentially link to the correct methods to compute?
+ // Some of them are defined on CSharpSemanticModel, so this could be difficult
+ NotComputed = 1,
+ ///
/// There is no information on the current nullable state of the variable
/// or value.
///
@@ -88,7 +95,7 @@ public enum Nullability
/// have unknown nullability are also referred to as oblivious expressions,
/// and they generally do not provide warnings for assignment or dereference.
///
- Unknown = 1,
+ Unknown = 2,
///
/// The variable or value is either known or declared to be non-null.
///
@@ -105,13 +112,13 @@ public enum Nullability
/// , because the compiler tracks null state regardless
/// of the declared nullability.
///
- NonNull = 2,
+ NonNull = 3,
///
/// The variable or value is either known or declared to possibly be null.
///
///
/// Nullable value types will always be considered to be .
///
- MaybeNull = 3
+ MaybeNull = 4
}
}