-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Preview 2:
- Intellisense (@333fred)
- Public API
- Display inferred nullability of variables, fields, properties, type arguments
- Should we display some hint about oblivious vs. non-null?
- Nullable Specification (Mads)
-
#nullable- binding (no more scoped context) Remove remaining artifacts of symbol-centric NonNullTypes context. #31607
-
#pragma warning nullable (enable|disable|restore)PR Add support for restore and safeonly for #nullable directive. #31806 - Code fixer
- Tuples Track nullable state for tuple items #29970
- More attributes e.g.:
[MaybeNull]- Finalize BCL types
-
!suppress conversion warnings!should suppress conversion warnings #30376 -
e switch { … },switch (e) { … }Nullable reference types: no nullability flow check in switch statements. #23944 - Avoid inferring unspeakable type arguments (PR Use speakable annotations in method type re-inference #31813)
- Dogfood
- WPFRunner
- CodeAnalysis
- Nullable value types Track Nullable Value Type Null State #29817, PR Track nullability of nullable value types #31499
-
[Nullable]metadata encoding (PR Adjust the way nullable annotations are represented in metadata #31212)- Sync with F# on format
- Analyze
yield returnNull warnings not reported for iterator methods #23701
Non-blocking:
- Annotations Need mechanism for injecting annotations #29821
- File format, MSBuild and loading logic
- Some IDE support
- Intellisense
- Display member annotations QuickInfo doesn't display nullability on properties #26830
- Display member annotations from metadata even when feature disabled
- Codegen for null-check on
parameter! - Lambdas: track nullability of captured variables Analyze captured variables at the location lambda is converted to a delegate #29617
- Local functions: track nullability of captured variables Analyze local functions in
NullableWalker#27233 - Other annotations
- Other attributes (
NullEquals,NullInNullOut,NotNulled) Recognize annotations on methods that affect nullability analysis #26761
- Other attributes (
-
[Nullable]- Include
NullableAttributein framework? See Use synthesized attribute infrastructure for System.NullableAttribute #22820 (comment)
- Include
- Add attribute types to Core 3
- Port attribute types to mono
- Coordinate integration with Razor
- NullableAttribute: Store flags into a field NullableAttribute constructor parameter should be stored in a field #30143
- Codefixer to add
#nullable enableandNullableReferenceTypesNullable: Fixer to add#nullableand project-level setting #30099- project system property or API Add support for Nullable build setting project-system#4058
- Other annotations
- Nullable property with non-nullable setter Need annotation for nullable property with non-nullable setter #26621
-
TypeSymbolWithAnnotations- Revert properties (
MethodSymbol.ReturnType, etc.) toTypeSymboland addTypeSymbolWithAnnotationsproperties - Review use of
TypeMap.AsTypeSymbolandTypeMap.AsTypeSymbolWithAnnotationsfor cases where nullability is dropped (@jcouv)
- Revert properties (
-
SymbolDisplay- Include
? - Include
!and~Add SymbolDisplay option to append suffix for unannotated reference types #28242
- Include
- Conversions
- Allow variance of out parameter:
void M(out string x)invoked withM(out string? x); - Infer nullability in
out varout vartreated as non-nullable #25347 - Infer nullability in deconstruction Nullability should be inferred from deconstruction #29618
- Which conversions remain?
- Allow variance of out parameter:
- Flow analysis
- De-reference should update null state Should not report warning for second dereference of nullable value #26749
- case patterns (
case null:,case string:,case string s:) Nullable reference types: no nullability flow check in switch statements. #23944 -
xinvar x = obliviousListOfString;should beList<string!>! - Anonymous types Inferred nullability should flow into anonymous type fields #24018
- Query clauses and range variables Implement nullability analysis in LINQ queries #29863
-
foreach (var x in maybeNull) { }Report warning using foreach with a nullable value #23493 - No warnings in unreachable code Handle unreachable code in the nullable walker #28798
- Fields and properties
- Report uninitialized warnings for static fields and properties Nullable Reference Types: CS8618 and/or CS8625 should be consistently reported for static fields/properties. #27014
- Track nullability of fields and properties
- Report warning for
nullinitializernullinitializer for non-nullable property (or field) should warn #26628 - Report warning before assignment Nullable Reference Types: A warning should be reported when dereferencing a field/property before it is assigned #27016
- No warnings for constructor that throws exception Reporting "field is uninitialized" for constructor that throws an exception #25529
- Use
VisitTypeto implementContainsNullableReferenceTypes. SeeTestDeepTypeAccessibilityBug18018test. -
!operator-
Warning for unnecessary!? Report hidden diagnostic for unnecessary!#25372 -
Error for!!. SeeStaticNullChecking.SuppressNullableWarning_Multiple!!should be disallowed #29902 - Error for
a! = b;. SeeStaticNullChecking.SuppressNullableWarning_Assignmentand InvalidOperationException in StackOptimizerPass1.IsIndirectAssignment withx! = null;#28377 -
ERR_NotNullableOperatorNotReferenceTypeshould be a warning not an error
-
- Method type inference
-
MergeDynamicandMergeTupleNamesignore nullability -
InferExtensionMethodTypeArgumentsignores nullability -
MethodGroupReturnTypeInferenceignores nullability
-
- Flow analysis
- Intersection with other C# 8.0 features (switch expression, null-coalescing assignment, ...)
-
??= - recursive patterns
-
- Intersection with other C# 8.0 features (switch expression, null-coalescing assignment, ...)
- Dogfood
- Update public API of Microsoft.CodeAnalysis.dll and Microsoft.CSharp.CodeAnalysis.dll
- Update tool for tracking public APIs
- EE
- Include
?annotations in Type for Locals and Watch
- Include
Productivity Migrated to project https://github.com/dotnet/roslyn/projects/43
-
QuickInfo
-
Authoring experience for external annotations
-
Can we make it easier to see what context we're in?
-
nullassignment suggests declaring as nullable Add a DeclareAsNullable fixer #26630 -
nulltest suggests declaring as nullable Add DeclareAsNullable refactoring #26661 -
Fix interface implementation or override Nullability fixer for interface implementations #26833
-
Grey out unnecessary
!Gray out unnecessary non-null suppression operator #26736 -
Grey out unnecessary
? -
Using
?or!suggests turning feature on (issue Nullable: Fixer to add#nullableand project-level setting #30099)- locally Create AddNonNullTypes code fixer #30098
- globally
-
help move
#nullableup/down the scopes -
classify
#nullable(PR Add syntax classification for nullable directives #31579) -
Indent
#nullableto the margin -
Marshalling options in OOP process (PR add new compilation options to data sync to OOP. #32726)
-
Performance
- Measure performance compiling Roslyn
-
IDE: Metadata view
Work related to project-system:
- project-system API for CPS Add NullableReferenceTypes property project-system#4277
- project-system API for csproj/legacy
- add drop-down in UI
- SDK work to set default value
- Code fixer to set
NullableReferenceTypesproject property (settingProject.Configuration.Properties["NullableReferenceTypes"]and declaring that "NullableReferenceTypes" BooleanProperty)
Preview 1:
- Fix installer Installing NonNullable Reference Types preview fails #29987
- Merge back to a preview branch
- Remove/replace PROTOTYPE markers
- IDE test pass
-
[NonNullTypes]-
Disable warnings with(no longer applicable)[NonNullTypes(Warnings=false)]Add NonNullTypesAttribute.Warnings property #29616 -
Fix/verify(no longer applicable)[NonNullTypes]in PE symbols - Injecting NonNullTypesAttribute Inject NonNullTypesAttribute #29180
- Use explicit NonNullTypes context in every TSWA Every TypeSymbolWithAnnotations should have an explicit NonNullTypes context #28766
- Warning for
!if no attribute (needs a new solution) - Enable warnings with
[NonNullTypes] - Warning for
?if no attribute or if[NonNullTypes(false)] - Remove syntax-based cycle breaking (modules, types, members)
- Enable feature with
[NonNullTypes]or[NonNullTypes(value)](
Bind NonNullTypes for types #28491)
-
- Method type inference
- Incorrect nullability arguments include
~Incorrect nullability from method type inference #27961
- Incorrect nullability arguments include
- Flow analysis
-
(object)x != nullWarnings reported after comparing with object == or != #27928 - L-values Suppression operator on L-values #27522
-
t.ToString();for unconstrainedT - tuples Missing warning on tuple nullability #28951
-
?.Infer nullability of receiver and member from?.expression #25870 -
s is stringPattern test should inform nullability #26745 -
ispatterns-
x is C y -
x is KwhereKis a constant other thannull
-
-
- Type parameters
- Substitution with
~and?or!(oblivious doesn't survive, LDM 7-11) - Support
objectconstraint; useobject?for unconstrained Support Object type as a generic type constraint. #29809 - Check constraints No warning for mismatched nullability in constraint #27742
- Error for
T?unlessTis constrained to a reference type or a value type Report error for T? when T is unconstrained #28804 - Support
class?constraint
- Substitution with
- Switch old tests to C# 8 (update default test options)
- Track nullability of unconstrained type parameters Track nullability of unconstrained type parameters #28956
- Performance
- Close allocation gap with null unaware C#
- Merge 15.8 branch
- Compiler command-line switch Add "Nullable" compilation option. #30479 and MSBuild setting
Metadata
Metadata
Assignees
Labels
Type
Projects
Status