- 03 10月, 2014 6 次提交
-
-
由 vladres 提交于
Fix bug 1036356: failing assert at Microsoft.CodeAnalysis.CSharp.LocalRewriter.MakeConversion (changeset 1347071)
-
由 RoslynTeam 提交于
-
由 dustincampbell 提交于
The following features have been updated to support interpolated strings: * Classification - start, mid, and end tokens of an interpolated string are now classified as strings. * Formatting - the formatter no longer adds spaces before and after insert "holes" in interpolated strings. From an IDE design perspective, we've decided to not enforce any spacing rules because it's possible that a user may want no spacing for a simple or dotted name (e.g. "\{name}") but *would* want spacing for more complex expressions. * Completion List - the position after a start or mid token is now considered an expression context, so the completion list appears as expected. * Automatic Brace Completion - Typing \{ will complete the closing } in standard brace completion scenarios. It will not complete when going back to edit a string unless the edit happens at the end of the line. This is consistent with how brace completion works in general. (We'll need a platform change to do otherwise.) * Brace Matching - \{ and } braces are highlighted in the editor when the caret is at the start or end of them respectively. (changeset 1346881)
-
由 vladres 提交于
Test for bug 1040171: ETA crashes if labeled statement is used as an embedded statement (changeset 1346866)
-
由 jmarolf 提交于
1. File IO error. 2. Incorrect options given. #2 will have some explainatory output, while #1 will not. Adding logging to determine which case is present. (changeset 1346801)
-
由 Pharring 提交于
-
- 02 10月, 2014 34 次提交
-
-
由 nmgafter 提交于
-
由 srivatsn 提交于
The Razor folks use the DiagnosticFormatter to format errors that they produce on their side. Some of the errors come from the parser and they create some errors on their own with the location set to Location.Create(...) which creates a ExternalFileLocation. In that case, we still have the proper line span information and should format that. (changeset 1346489)
-
由 srivatsn 提交于
-
由 srivatsn 提交于
-
由 srivatsn 提交于
The RegisterSessionAnalyzer on an AnalysisContext is a way for one session analyzer to register another session analyzer. We haven't needed such functionality till and currently this doesn't function either because it doesn't call the Initialize methods of the session analyzers. Removing this method for preview. If we get requests for this scenario, we can add this API back. With this removed, all the Register* methods on context all register actions. This was the only one that registered an analyzer. (changeset 1346448)
-
由 shyamn 提交于
Fix a couple more inconsistencies between release and debug configurations to fix build breaks in release introduced in C1346108 (I didn't catch this in my previous change because this issue breaks build for DevDivInserionFiles.sln and we don't build this solution as part of test.exe) (changeset 1346435)
-
由 srivatsn 提交于
The syntax analyzer APIs take a type parameter which was called TSyntaxKind. There has been feedback that this confused people a lot - people assumed that they are supposed to pass the type corresponding to a syntax node and would pass in something like NamedTypeSyntax and this wasn't found out until it blew up at runtime with an unintelligible error. This change renames the type variables to TLanguageKindEnum and puts a struct constraint on it so that the common mistake of passing in a node would get caught at compile time. (changeset 1346415)
-
由 nmgafter 提交于
-
由 shyamn 提交于
-
由 heejaechang 提交于
removed all other diagnostic instrument code except the ponit where we get MEF services from ExportProviders. (changeset 1346356)
-
由 VSadov 提交于
For accesses to an autoprop in a corresponding [static|instance] constructor - (a) It should bind to the property, but the property should be treated as a readable/writable even if it is a readonly autoprop. (b) The definite assignment behavior should be as if directly accessing the backing field. (c) It should code gen to the property accessor (if one exists) or a field access (if not). The most observable outcome of all this is that it is possible to assign a readonly autoprop in the constructor and that in a struct instance constructor you no longer need to initialize whole struct before using any of its autoprops. The following code is now valid and does what you think it does: public struct S { public int X{get;} public int Y{get;} public S() { X = 42; Y = X; } public static void Main() { S s = new S(); System.Console.WriteLine(s.Y); } } . (changeset 1346315)
-
由 nmgafter 提交于
Interaction between nameof and IndexerNameAttribute causes the latter to not work correctly (changeset 1346254)
-
由 dpoeschl 提交于
Bugfix 1037992 "LockRecursionException on linked file close" and 1039084 "Closing a shared document tab may cause the shared item context hierarchy to switch" Bug 1037992 "LockRecursionException on linked file close" - The workspace's OnDocumentClosed method may need to pick a new active context document and alert appropriate hierarchy of the change. Doing so may cause us to be called back via OnDocumentContextUpdated while still holding the serialization lock. We now alert the appropriate hierarchy of the active context change outside of OnDocumentClosed's serialization lock. Bugfix 1039084 "Closing a shared document tab may cause the shared item context hierarchy to switch" - In the Workspace's OnDocumentClosed method, we were lacking enough context to distinguish between cases where just one of a set of linked/shared files was closed (e.g. excluding a linked file from one of its owning projects or unloading one of the head projects for a shared project) and cases where the entire set of linked/shared files was closed (e.g. closing the tab of a shared document). In the former case, we need to pick a new active context document and alert the outside world (setting SharedItemContextHierarchy or calling TransferItem) so that the open tab updates correctly and the we stay in sync with the containing hierarchies. In the latter case, we must not alert the outside world between individual document closes. We now distinguish between these cases in OnDocumentClosed. The DocumentProvider decides the updateActiveContext flag by whether or not multiple documents are being closed at once. If multiple documents are being closed, it assumes all documents are being closed and chooses not to update the active context. (changeset 1346228)
-
由 TomasMatousek 提交于
Rename internal FieldInitializer struct in C# to FieldOrPropertyInitializer, since it actually may represent a property initializer and to match VB impl. (changeset 1346166)
-
由 angocke 提交于
-
由 jmarolf 提交于
Extending timeout to be a maximum of 5 minutes, and adding logging to see which operation caused the test to time out. (changeset 1346136)
-
由 Kevin_H 提交于
Change LookupForExtensionMethods to ignore accessibility based on LookupOptions and fix some formatting... (changeset 1346125)
-
由 AlekseyTs 提交于
Create a project for a vbcsc2ui.dll to hold resource used by vbc2.exe and csc2.exe. (changeset 1346108)
-
由 Basoundr_ms 提交于
Bugfix 608827 - CR (changeset 1346106)
-
由 vladres 提交于
Bugs 1026593, 1026595: Set DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null for all XML processing. Also fixes minor typos and redundant code. (changeset 1346103)
-
由 TomasMatousek 提交于
VB compiler currently creates "user-defined" function return value locals even in methods where they are not (and should not be) accessible from user code, such as lambdas, iterators, async methods and operators. In some of these cases the variables have a synthetic name that prevents them from showing up in EE. In other cases they show up, but they shouldn't since they are not accessible from user code and changing their value doesn't work and doesn't make much sense either (e.g. in an iterator the variable showed up under MoveNext name and was of type IEnumerable<T>). This change switches such variables to synthesized variables (as opposed to user-defined). For now they are emitted to PDBs under name "VB$FRV" to satisfy various assertions. Names of all synthesized locals that are not used by the EE will be dropped in a follow-up check-in. (changeset 1346061)
-
由 TomasMatousek 提交于
(changeset 1346054)
-
由 heejaechang 提交于
don't crash VS on fatal error on esent (fatal errors include things such as out of disk space, log file got corrupted by other process and etc). in these cases, we will recover the issue by using memory cache. (changeset 1346037)
-
由 angocke 提交于
***NO_CI*** (changeset 1346027)
-
由 dpoeschl 提交于
Make DocumentInfo.DefaultEncoding internal until we have a strong reason to make it public. (changeset 1346025)
-
由 nmgafter 提交于
-
由 TomasMatousek 提交于
This shelveset implements following changes to metadata reference compiler API in order to remove duplication in the public surface and prevent users from unexpected metadata lifetime issues: 1) MetadataImageReference and MetadataFileReference overlap Currently MetadataImageReference can be constructed from a Stream. MetadataImageReference supports metadata prefetch (reading the blob into memory and close the underlying stream) as well deferred reading (no content is read until the reference is consumed during compilation). MetadataFileReference only supports deferred reading. Lifetime of MetadataFileReference is non-deterministic, the underlying file is locked until no references exist and we GC the metadata. On the other hand, it is possible to construct MetadataImageReference in such a way that allows controlling the underlying resources deterministically. Remove MetadataFileReference, use MetadataImageReference instead. 2) Lifetime management AssemblyMetadata and ModuleMetadata objects hold on resources and implement IDisposable. When using MetadataFileReference constructors and some MetadataImageReference constructors to create references the underlying metadata objects are created implicitly and the user doesn’t have a way to explicitly dispose them. Make MetadataImageReference constructors internal and instead add factory method GetReference on AssemblyMetadata/ModuleMetadata. The usage pattern is: using (var metadata = AssemblyMetadata.CreateFromXxx(…)) { var compilation = CSharpCompilation.Create(syntaxTrees, new[] { metadata.GetReference() }); … } In addition the shelveset makes MetadataImageReference internal and adds the following convenience APIs, that are not the most efficient but are very convenient, easy to discover and safe to use for customers that don’t wanna explicitly manage the lifetime of metadata objects. (changeset 1345987)
-
由 jaredpar 提交于
-
由 vladres 提交于
Fix bug 1032724: Do not give error CS0842: 'C.X': Automatically implemented properties cannot be used inside a type marked with StructLayout(LayoutKind.Explicit) for static auto-properties (changeset 1345941)
-
由 heejaechang 提交于
recent dump indicates that some MEF services are found in MEF export provider but not in the map we creates off the MEF services. I added more data to be saved in the dump to see where that mismatch happens. (changeset 1345914)
-
由 jaredpar 提交于
This change implements a new DiagnosticAnalyzer for equality which adds the following rules (VB and C#) 1. If a struct overrides Object.Equals it should implement IEquatable<T>. This avoids boxing and extra type checks in many scenarios 2. If a struct or class implements IEquatable<T> it should override Object.Equals. Without this the equality implementation is simply incomplete and will unexpectedly fail when Object.Equals There were a number of violations in the Roslyn source tree of these rules which I cleaned up as a part of this change. A couple of notes on that work - In several places Equals and GetHashCode were overridden simply to throw an exception. Rather than implement IEquatable<T> (and pay the cost of the interface JIT) I just suppressed the analysis - Hash utility class cannot be used from RoslynTaoActions because it comes from 2 different referenced DLLs. For now I just manually implemented hashshing, can use extern aliases to solve if there is a strong desire for this (changeset 1345744)
-
由 AlekseyTs 提交于
C# SymbolDisplay: Do not qualify properties and events with implemented interface name unless they were already qualified. (changeset 1345691)
-
由 stoub 提交于
Replace some empty array allocations with Roslyn.Utilities.SpecializedCollections.Empty* (changeset 1345631)
-
由 manishv 提交于
This change introduces following context objects: (a) CodeFixContext struct which is passed into CodeFixProvider.GetFixesAsync method and (b) CodeRefactoringContext struct which is passed into CodeRefactoringProvider.GetRefactoringsAsync. (changeset 1345537)
-