1. 06 10月, 2015 2 次提交
  2. 09 9月, 2015 1 次提交
  3. 10 6月, 2015 1 次提交
  4. 04 6月, 2015 2 次提交
    • J
      Responding to PR Feedback · bca5a252
      Jonathon Marolf 提交于
      Responding to peer review feedback. Updated to never consider user
      defined narrowing conversions unnecessary.
      bca5a252
    • J
      Correctly detect option strict on/off when determining if cast is redundant · fcd4ea01
      Jonathon Marolf 提交于
      Fixes #3161 and Fixes #3163
      
      User Scenario:
      User has code with narrowing conversion with an explicit cast.  We will
      offer to remove the cast even though this will cause the code to not
      compile.
      
      Fix Description:
      We previously never consulted optionstrict to determine if a
      user-defined narrowing cast was necessary.  The fix in CastAnalyzer.vb
      will check if the conversion is narrowing, if option strict is on, or if
      we generate a warning on implicit narrowing conversions.  We also offer
      to add a cast if an implicit conversion warning is given.
      
      Testing:  Added regression tests + existing tests
      fcd4ea01
  5. 19 5月, 2015 1 次提交
    • M
      Dont offer cast simplification fixes for explicit reference conversions. · 6f906fa6
      Manish Vasani 提交于
      For code snippets such as below: "Base M(Base b) => (Derived)b;", we currently offer cast removal for cast to derived. However, this involves an explicit/narrowing conversion and hence can lead to an exception or data loss. The only way to detect such redundant casts is via flow analysis, which is not currently in our scope.
      
      Fix is to bail out early for such cast expressions. I have also fixed incorrect tests that were added to ensure the current behavior.
      
      Fixes #2761
      6f906fa6
  6. 15 1月, 2015 1 次提交
  7. 14 1月, 2015 1 次提交
  8. 07 1月, 2015 3 次提交
  9. 04 12月, 2014 1 次提交
  10. 29 10月, 2014 1 次提交
    • M
      Fix for bug 1031406: Bad unnessary cast code fix offered for trycast in VB · cecbbffa
      manishv 提交于
      We offer cast removal for case where expression type and outer type are identical and cast to outer type is widening reference conversion. However, we also need to check if expression to cast type is not a narrowing reference conversion as that can cause cast removal to change the runtime value of the expression. I also fixed an incorrect test that was verifying the current behavior. (changeset 1362323)
      cecbbffa
  11. 07 10月, 2014 1 次提交
    • J
      Make much of the Workspaces layer Portable. · e76a29a4
      jasonmalinowski 提交于
      This change splits the Workspaces layer into two parts, mirroring the Portable/Desktop split that the compilers did. The core parts of the Workspaces layer (managing documents and projects, formatting, some refactoring, code fixes) is kept in the portable subset, with a few non-portable pieces remaining, notably MSBuild support.
      
      This change has a major impact on how MEF now works in Roslyn. Traditional MEF (“MEFv1”) is not portable, and so we must move the Workspaces layer over to using the Microsoft.Composition NuGet package (“MEFv2”) which is. The APIs are distinct in that each has its own namespace, but the concepts are more or less identical. It requires some care though: the workspaces layer is simple in that it only references MEFv2, but higher layers have to reference both versions to use metadata attributes. Exports using metadata attributes from the editor (say, ContentTypeAttribute) must use MEFv1 attributes to export, whereas exports for the workspaces layer must use MEFv2 attributes. The rule is subtle and yet simple, and so a diagnostic is provided which catches any offenses to prevent confusion.
      
      This also has some impact in how we create MEF hosts: if you wish to host just the base workspaces layer, we can use MEFv2 to compose everything. The HostServices implementation (MefV1HostServices) that consumes a MEFv1 ExportProvider. If you’re in Visual Studio, you can use this implementation to get the full set of host services provided in Visual Studio.
      
      Otherwise, most of the changes in here are minor: we react to some APIs that have been moved/renamed in the portable subset we are targeting, and also align our various exception helper utilities with the compiler’s precedent. (changeset 1349276)
      e76a29a4
  12. 06 10月, 2014 1 次提交
  13. 26 3月, 2014 1 次提交
  14. 19 3月, 2014 1 次提交