1. 07 5月, 2019 1 次提交
  2. 04 5月, 2019 2 次提交
  3. 02 5月, 2019 1 次提交
  4. 01 5月, 2019 1 次提交
  5. 30 4月, 2019 1 次提交
    • A
      Make sure nullability mismatch in constraints specified in different partial... · b252adb7
      AlekseyTs 提交于
      Make sure nullability mismatch in constraints specified in different partial declarations (types/methods) are properly detected and reported. (#35272)
      
       Make sure nullability mismatch in constraints specified in different partial declarations (types/methods) are properly detected and reported.
      
      Fixes #30229.
      Fixes #35179.
      
      Implements the following LDM decision:
      
      For partial types, the invariant matching from type inference and merging. A mismatch
      between two non-oblivious candidates produces an error. No warnings are produced.
      
      For partial methods, nullability has to match with exception for oblivious and we produce warnings.
      For the result, we use the implementation signature inside the implementation, and the
      declaration signature for the callers.
      b252adb7
  6. 12 4月, 2019 1 次提交
  7. 06 4月, 2019 1 次提交
  8. 29 3月, 2019 1 次提交
  9. 27 3月, 2019 1 次提交
  10. 22 3月, 2019 1 次提交
  11. 15 3月, 2019 1 次提交
  12. 14 3月, 2019 1 次提交
  13. 13 3月, 2019 1 次提交
  14. 12 3月, 2019 1 次提交
  15. 09 3月, 2019 3 次提交
  16. 28 2月, 2019 2 次提交
    • N
      Address some code review comments. · 7e325b52
      Neal Gafter 提交于
      7e325b52
    • R
      Fix stack overflow where overload resolution gets parameter type attributes (#33498) · ceea0803
      Rikki Gibson 提交于
      * Add reproducer for #33388
      
      * Skip normalizing task types if binding attribute arguments
      
      * Use InAttributeArgument property
      
      * Add test where task-like normalization affects overload resolution
      
      * Update AttributeArgument_TaskLikeOverloadResolution test case
      
      * Add assert and remove apparently unused branch
      
      * Add back comparison of remaining parameter types with InAttributeArgument guard
      
      * Update comment on remaining parameter comparisons
      
      * Add comment describing why we don't normalize task types in attribute arguments
      ceea0803
  17. 26 2月, 2019 1 次提交
  18. 25 2月, 2019 1 次提交
    • N
      Revise NullableWalker to use a two-state solution · 6c329e3e
      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).
      6c329e3e
  19. 16 2月, 2019 2 次提交
    • J
      Respond to PR feedback · 0c576cb5
      Jared Parsons 提交于
      0c576cb5
    • J
      Be more deliberate about nullability checking · f2ac8cac
      Jared Parsons 提交于
      Most nullability checking of tuple values should occur during the
      nullable walking phase. This is because the test relies on the inference
      of the values, not the explicit types in the code. The only time we need
      to validate tuple nullability constarints during initial binding is when
      we're binding a named type.
      f2ac8cac
  20. 12 2月, 2019 1 次提交
  21. 09 2月, 2019 3 次提交
    • J
      Use Compiltation to thread through nullability · 3dad9191
      Jared Parsons 提交于
      The work for generic `unmanaged struct` constraints ended up threading
      through the correct `Compilation` object in many of the cases where I
      was using `Compilation` to calculate whether or not nullability needed
      to be checked for constraints. Used that whenever possible.
      3dad9191
    • J
      Make nullability explicit constraint parameter · 345e9e95
      Jared Parsons 提交于
      This makes nullability an explicit parameter to constraint checking
      rather than inferring it from the `ConversionsBase` argument. The reason
      is that these really represent separate operations: checking nullability
      in conversions and validating nullability in constraint checking.
      345e9e95
    • J
      Enable constraint checks in signatures · ad92327f
      Jared Parsons 提交于
      closes #32953
      ad92327f
  22. 01 2月, 2019 1 次提交
  23. 30 1月, 2019 1 次提交
  24. 16 1月, 2019 1 次提交
  25. 11 1月, 2019 2 次提交
  26. 10 1月, 2019 1 次提交
  27. 05 1月, 2019 1 次提交
  28. 01 1月, 2019 1 次提交
  29. 19 12月, 2018 1 次提交
  30. 11 12月, 2018 1 次提交
  31. 10 12月, 2018 2 次提交