1. 29 10月, 2014 13 次提交
  2. 21 10月, 2014 4 次提交
    • A
      DevDiv #1024137 - Part 1: "this" in C# iterators and async · 1c2452f7
      acasey 提交于
      When the callstack tells us that we're in a state machine MoveNext method, we want to bind as though we're really in the iterator or async method that caused the state machine to be generated.  Parameters and locals are handled by special binders, but "this" and "base" won't work unless the binder has an appropriate ContainingType, which in turn depends on ContainingMemberOrLambda.
      
      Unfortunately, the generated code (and the custom debug info) lacks sufficient information to map back to a single member.  All we get is the name of the member in the mangled name of the state machine type.  We apply a heuristic to choose an appropriate overload, if there are multiple, and accept that sometimes we will pick the wrong one.  We believe that picking the wrong one will be benign since the binder uses relatively few properties of the ContainingMemberOrLambda and the ones it does (mainly, ContainingType) are consistent across all overloads.
      
      Bonus: merge ThisReferenceRewriter into CapturedVariableRewriter.  This saves us a pass over the bound tree and eliminates an intermediate state in which "this" has the wrong type (ThisReferenceRewriter used to break it and let CapturedVariableRewriter correct it).
      
      TODO: Part 2 - "Me" in VB iterators and async.
      TODO: Part 3 - "this" in anonymous functions.
      
      CR: ChuckS, KevinH (changeset 1357667)
      1c2452f7
    • N
    • C
      NullReferenceException in GetDiagnostics for optional parameter in security... · a89e78b5
      ChuckStoner 提交于
      NullReferenceException in GetDiagnostics for optional parameter in security attribute (changeset 1357563)
      a89e78b5
    • M
      Assert that SynthesizedInstanceMethodsSymbols are not static. · db4ab560
      matell 提交于
      The code for TryGetThisParameter handed the case where the method symbol represented a static method.  However, this should never be the case for an SynthesizedInstanceMethodSymbol, so instead we just assert that the method is non-static. (changeset 1357515)
      db4ab560
  3. 20 10月, 2014 1 次提交
  4. 17 10月, 2014 12 次提交
  5. 16 10月, 2014 6 次提交
    • N
    • T
      Replace checked-in analyzers with the the new Microsoft.Net.RoslynDiagnostics NuGet package. · 8bf681c7
      tmeschter 提交于
      This also updates Microsoft.Net.ToolsetCompiler to the corresponding version. (changeset 1355122)
      8bf681c7
    • M
      Fix for bug 1046530: Should the strings in... · 7990f04a
      manishv 提交于
      Fix for bug 1046530: Should the strings in Microsoft.CodeAnalysis.DiagnosticFormatter.GetMessagePrefix be localized?
      
      Localize the diagnostic severity in DiagnosticFormatter.GetMessagePrefix. (changeset 1355104)
      7990f04a
    • M
      FIx for bug 1038237: Incorrect warnings in Error List for #pragma warning... · 770e8ec7
      manishv 提交于
      FIx for bug 1038237: Incorrect warnings in Error List for #pragma warning disable'd code with Closed File Diagnostics enabled
      
      The issue here is that root of the syntax trees recovered from temporary storage stream didn't have the ContainsDirective flag set, even when it had pragma directives. Hence, while computing diagnostics for closed files, we intermittently see diagnostics which have been suppressed by pragma directives appear in the error list.
      Fix is to ensure that the stream based constructor for DirectiveTriviaSyntax node has this flag set, just like it's other constructors. (changeset 1355099)
      770e8ec7
    • C
      Update assert in TypeUnification.CanUnify for substitutions from type... · 99239f9f
      ChuckStoner 提交于
      Update assert in TypeUnification.CanUnify for substitutions from type parameter to type parameter (changeset 1354882)
      99239f9f
    • M
      Removed code from MSBuildWorkspace that was trying to support adding/removing additional documents. · 7509b3c3
      mattwar 提交于
      Moved default host services logic from MSBuildWorkspace to new type DesktopMefHostServices type.
      
      Changed CommandLineProject to make workspace parameter optional. You only need to specify workspace if want to override behavior of some of the services (beyond default).
      
      Added WorkspaceServices.GetRequiredService and LanguageServices.GetRequiredService API that throws InvalidOperationException if service is not available.
      
      Changed Workspace.AddDocument and Workspace.AddAdditionalDocument to take DocumentInfo instead of multiple parameters (for future proofing signature.)
      
      Added ApplyChangesKind enum values for analyzers and additional documents
      
      Changed Workspace TryApplyChanges to check for all unsupported changes before starting to apply.
      Changed separate *apply* methods to default to calling equivalent OnXXX method instead of throwing.
      
      Changed CustomWorkspace.CanApplyChanges to default to true for all kinds.
      Added error messages for each ApplyChangesKind
      
      Added missing WithXXX methods from DocumentInfo (changeset 1354869)
      7509b3c3
  6. 15 10月, 2014 4 次提交