1. 11 7月, 2019 1 次提交
    • A
      Fix crash in semantic model when using unmanaged constraint (#37022) · 64007b69
      Andy Gocke 提交于
      The semantic model often creates ReducedExtensionMethods for the public API,
      but the creation of ReducedExtensionMethod does constraint checking, which
      requires a compilation, which isn't always available. This change removes constraint
      checking from all creation of ReducedExtensionMethod and adds asserts that we
      always have a compilation during constraint checking.
      
      Fixes #37021
      64007b69
  2. 13 3月, 2019 1 次提交
  3. 09 3月, 2019 1 次提交
    • N
      Simplify some names in the nullable reference types feature · 85b05131
      Neal Gafter 提交于
      - Rename `TypeSymbolWithAnnotations` to `TypeWithAnnotations`
      - Rename its type field from `TypeSymbol` to `Type`
      - Fields of Symbols that are of type `TypeWithAnnotations` that are currently named `Type` would be renamed `TypeWithAnnotations`
      Fixes #33736
      85b05131
  4. 26 2月, 2019 1 次提交
  5. 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
  6. 15 2月, 2019 1 次提交
  7. 09 2月, 2019 1 次提交
    • 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
  8. 28 11月, 2018 1 次提交
  9. 23 9月, 2018 1 次提交
  10. 10 9月, 2018 1 次提交
  11. 17 8月, 2018 1 次提交
  12. 03 8月, 2018 1 次提交
  13. 02 8月, 2018 1 次提交
  14. 09 3月, 2018 1 次提交
  15. 14 9月, 2017 1 次提交
  16. 17 6月, 2017 1 次提交
  17. 29 4月, 2017 1 次提交
    • T
      Async main codegen (#18472) · 05391555
      Ty Overby 提交于
      * attempt to get main entrypoints working
      
      * async main codegen
      
      * remove garbage file
      
      * fix vb tests
      
      * add some comments
      
      * moduleBeingBuilt can sometimes be null apparently
      
      * fix style nits
      
      * more whitespace fixes
      
      * address feedback
      
      * automated style fixer
      
      * move most work out into the constructor
      
      * protect against null in error condition
      
      * add comment
      
      * address cston review
      
      * autoformat
      
      * use cast
      
      * check module being built
      
      * add another object cast
      
      * address review
      
      * check for old cases where async methods called Main also exist
      
      * more suggestions
      
      * autoformat
      
      * mostly cleanup
      
      * use shorter Count and Single
      
      * remove superfluous diagnostics add
      
      * check exit code / revert to old entrypoint finding code
      
      * remove language version check in entrypoint compiler
      
      * fix debug.assert
      
      * switch to assert equal
      
      * codereview
      
      * add more tests; change conditions for test execution
      
      * fix up emit methods
      
      * narrow down error location
      
      * ammend GetAwaitableExpressionInfo to return a bound call to GetAwaiter().GetResult()
      
      * more comments
      
      * find entrypoint methods uses the async binder
      
      * autoformat
      
      * use diagnostics from async binder
      
      * relocate tests
      
      * fix suggestions for review 8346
      
      * add back no-async tests with better location
      
      * only allow named types
      
      * remove empty file; remove null checks from helper
      
      * forgot to add csproj file
      
      * emit into warning diagnostics instead of regular diagnostics
      
      * autoformat
      
      * remove unused file from merge
      
      * use diagnostic locations
      
      * move some methods around, split some tests up
      
      * fix non-returning async tests, remove bool return from check availability
      
      * add params test
      
      * style and expected output fix
      
      * switch back to null because default emits warnings
      
      * add partial method tests
      
      * fix locations for unix
      
      * better partial syntax tests
      
      * use expected length of 0
      
      * use default length of 0 for expected output
      
      * check implementation symbol
      05391555
  18. 01 10月, 2016 1 次提交
  19. 20 7月, 2016 1 次提交
  20. 08 7月, 2016 1 次提交
  21. 31 10月, 2015 1 次提交
  22. 16 10月, 2015 1 次提交
  23. 22 8月, 2015 1 次提交
  24. 24 6月, 2015 1 次提交
  25. 28 4月, 2015 1 次提交
  26. 15 1月, 2015 1 次提交
  27. 14 1月, 2015 1 次提交
  28. 24 6月, 2014 1 次提交
  29. 20 6月, 2014 1 次提交
    • T
      Splits Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.CSharp and... · fc3b332f
      TomasMatousek 提交于
      Splits Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.CSharp and Microsoft.CodeAnalysis.VisualBasic into portable and desktop assemblies.
      
      Existing Core\Source, CSharp\Source and VisualBasic\Source directories are renamed to Core\Portable, CSharp\Portable and VisualBasic\Portable.
      New sibling Desktop folders are added and non-portable source is moved there.
      "System.Runtime" references has to be removed in order for the portable project system magic to automatically add facade references.
       (changeset 1281686)
      fc3b332f
  30. 19 3月, 2014 1 次提交