- 28 2月, 2019 1 次提交
-
-
由 Neal Gafter 提交于
-
- 25 2月, 2019 1 次提交
-
-
由 Neal Gafter 提交于
The NullableWalker is revised so that the inferred state of an expression is either `NotNull` or `MaybeNull` (represented by the new type `NullableFlowState`). There is no longer such as thing as an oblivious rvalue. There are four kinds of lvalues: - oblivious lvalues read as NotNull but null can be written to them - annotated lvalues read as MaybeNull and null can be written to them - unannotated lvalues read as NotNull and null may not be written to them - unconstrained type parameters read as MaybeNull but null may not be written to them In order to preserve the safety in the face of such unconstrained type parameters, we warn immediately when a null value of such a type is introduced. This is a safety warning. The contexts in which such a warning are given are - `default` and `default(T)` - `null` conversion to `T` (when `T` is known to be ref type) - `e?.M()` when the return type is `T` - dynamic conversion or cast to `T` when the dynamic might be null - explicit conversion to `T` - `e as T` when there is not an implicit conversion from the type of `e` to `T` - a call to a method like `FirstOrDefault()` that is annotated with `[MaybeNull] (not yet implemented) We remove the hidden diagnostics previously computed by the NullableWalker. We add debugger display support for a number of types used by the NullableWalker. The display for `NullableWalker` summarizes the computed nullability of variables in a nice compact form. We remove support for definite assignment in the NullableWalker. Some scenarios involving the use of not-definitely-assigned variables may cause cascaded diagnostics. We might remove them in the future by initializing all vaiables to the `NotNull` state when they enter scope. We overhaul and simplify the inplementation of conversions, the null-conditional operator, and result inference for lifted operators. We simplify the Meet and Join operations so that they form a lattice on both the NullableAnnotation and NullableFlowState. Catch variables are now initialized to a non-null state on entry to the catch block. In unreachable code, every expression produces a non-null rvalue. An erroneous expression produces a non-null rvalue (to suppress cascaded diagnostics).
-
- 23 2月, 2019 1 次提交
-
-
由 Julien Couvreur 提交于
-
- 13 2月, 2019 1 次提交
-
-
由 Julien Couvreur 提交于
-
- 05 2月, 2019 1 次提交
-
-
由 Andy Gocke 提交于
-
- 04 2月, 2019 1 次提交
-
-
由 Andy Gocke 提交于
Adds a new "Preview" language version for C# that means the latest supported language version + the preview features available in the compiler. Also changes the "Default" (unspecified) language version to mean Preview, but provides a warning when preview features are used.
-
- 01 2月, 2019 1 次提交
-
-
由 Julien Couvreur 提交于
-
- 11 1月, 2019 1 次提交
-
-
由 AlekseyTs 提交于
-
- 04 1月, 2019 2 次提交
-
-
由 Julien Couvreur 提交于
-
由 AlekseyTs 提交于
Fixes #31974 Related to #30655, fixes for C# Related to #31977, fixes for C# Fixes #31858
-
- 11 12月, 2018 1 次提交
-
-
由 Charles Stoner 提交于
-
- 29 11月, 2018 1 次提交
-
-
由 AlekseyTs 提交于
Don't warn about "!", regardless of context (https://github.com/dotnet/csharplang/blob/master/meetings/2018/LDM-2018-10-29.md). Closes #30177. Closes #30021.
-
- 07 11月, 2018 1 次提交
-
-
由 Neal Gafter 提交于
* Discard pattern versus symbol named `_` - A discard pattern is not accepted at the top level in a switch statement. In that case `_` binds to a constant in scope with a warning WRN_CaseConstantNamedUnderscore that is included in a warning wave. - A discard pattern is not accepted at the top level in an is-expression. In that case `_` binds to a type in scope with a warning WRN_IsTypeNamedUnderscore that is included in a warning wave. - Elsewhere a pattern `_` is a discard without warning no matter what definition for `_` might be in scope. Fixes #30650 See also #30846
-
- 27 10月, 2018 1 次提交
-
-
由 Neal Gafter 提交于
Fixes #30788 Relates to #30795 and #30794
-
- 17 10月, 2018 1 次提交
-
-
由 Charles Stoner 提交于
-
- 16 10月, 2018 1 次提交
-
-
由 Charles Stoner 提交于
-
- 11 10月, 2018 1 次提交
-
-
由 AlekseyTs 提交于
-
- 26 9月, 2018 1 次提交
-
-
由 Charles Stoner 提交于
-
- 08 9月, 2018 1 次提交
-
-
由 AlekseyTs 提交于
-
- 07 9月, 2018 1 次提交
-
-
由 Julien Couvreur 提交于
-
- 06 9月, 2018 1 次提交
-
-
由 Fredric Silberberg 提交于
All known outstanding tests are added. Also addressed all known outstanding work items.
-
- 31 8月, 2018 1 次提交
-
-
由 AlekseyTs 提交于
Also implemented detection of nullability mismatch in constraints for an implicit interface implementation.
-
- 07 8月, 2018 1 次提交
-
-
由 Julien Couvreur 提交于
-
- 03 8月, 2018 1 次提交
-
-
由 Charles Stoner 提交于
-
- 31 7月, 2018 1 次提交
-
-
由 Julien Couvreur 提交于
-
- 19 5月, 2018 1 次提交
-
-
由 Lauren Fay 提交于
-
- 14 4月, 2018 1 次提交
-
-
由 Omar Tawfik 提交于
-
- 10 4月, 2018 1 次提交
-
-
由 Neal Gafter 提交于
Both refutable and irrefutable is-pattern matches affect definite assignment: - an irrefutable match leaves pattern variables definitely assigned - a refutable match is an error Fixes #25890 Also, we check to see if a constant input makes the result refutable or irrefutable: - If a constant cannot match the pattern, we issue a warning - If a constant always matches a constant pattern, we issue a warning The latter two are subject to compat council approval. Fixes #16099
-
- 28 3月, 2018 1 次提交
-
-
由 Neal Gafter 提交于
Note that this error does not apply to the discard *designation*, only the discard *pattern*. Since the discard designation is new in C#8, this is not a breaking change. Report an error if a constant named '_' is used as a constant pattern. This error has been confirmed by the LDM on 2017-11-20 Also report a warning if a type named '_' is used in an is-type expression. This requires compat council confirmation. Open issues in https://github.com/dotnet/csharplang/issues/1054 describe pending LDM decisions for potentialy breaking scenarios.
-
- 23 3月, 2018 1 次提交
-
-
由 Charles Stoner 提交于
-
- 21 3月, 2018 1 次提交
-
-
由 Neal Gafter 提交于
-
- 16 3月, 2018 1 次提交
-
-
由 Charles Stoner 提交于
-
- 13 3月, 2018 1 次提交
-
-
由 Julien Couvreur 提交于
-
- 24 2月, 2018 1 次提交
-
-
由 Neal Gafter 提交于
-
- 10 12月, 2017 1 次提交
-
-
由 Neal Gafter 提交于
* Forbid 'default' as a case constant or a pattern. Fixes #23499
-
- 14 11月, 2017 2 次提交
-
-
由 elijah6 提交于
* Separating warning messages for constant filter expression * Deal with try-catch with finally block and add test
-
由 Julien Couvreur 提交于
-
- 03 11月, 2017 1 次提交
-
-
由 Charles Stoner 提交于
Warn for uninitialized non-nullable fields
-
- 22 8月, 2017 1 次提交
-
-
由 Charles Stoner 提交于
Changes to opt-in/out for warnings - Additional feature flag options - Distinct opt-in for non-null warnings - [NullableOptOut] no longer opts-out of warnings, it only controls whether unadorned reference types are treated as non-null - Allow treating locals as nullable regardless of declaration
-
- 12 7月, 2017 1 次提交
-
-
由 Charles Stoner 提交于
-