From 7a69be81c5ecf50202e6178561f588367d65ae3d Mon Sep 17 00:00:00 2001 From: Heejae Chang Date: Wed, 11 Jan 2017 00:52:42 -0800 Subject: [PATCH] changed WithXXX method to go through no validation code path --- src/Compilers/CSharp/Portable/CSharpParseOptions.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Compilers/CSharp/Portable/CSharpParseOptions.cs b/src/Compilers/CSharp/Portable/CSharpParseOptions.cs index b2fb61f332e..345f7a8be9f 100644 --- a/src/Compilers/CSharp/Portable/CSharpParseOptions.cs +++ b/src/Compilers/CSharp/Portable/CSharpParseOptions.cs @@ -48,7 +48,11 @@ public override IEnumerable PreprocessorSymbolNames DocumentationMode documentationMode = DocumentationMode.Parse, SourceCodeKind kind = SourceCodeKind.Regular, IEnumerable preprocessorSymbols = null) - : this(languageVersion, documentationMode, kind, preprocessorSymbols.ToImmutableArrayOrEmpty()) + : this(languageVersion, + documentationMode, + kind, + preprocessorSymbols.ToImmutableArrayOrEmpty(), + ImmutableDictionary.Empty) { // We test the mapped value, LanguageVersion, rather than the parameter, languageVersion, // which has not had "Latest" mapped to the latest version yet. @@ -100,18 +104,19 @@ public override IEnumerable PreprocessorSymbolNames } // No validation - internal CSharpParseOptions( + private CSharpParseOptions( LanguageVersion languageVersion, DocumentationMode documentationMode, SourceCodeKind kind, - ImmutableArray preprocessorSymbols) + ImmutableArray preprocessorSymbols, + ImmutableDictionary features) : base(kind, documentationMode) { Debug.Assert(!preprocessorSymbols.IsDefault); this.SpecifiedLanguageVersion = languageVersion; this.LanguageVersion = languageVersion.MapSpecifiedToEffectiveVersion(); this.PreprocessorSymbols = preprocessorSymbols; - _features = ImmutableDictionary.Empty; + _features = features; } public override string Language => LanguageNames.CSharp; -- GitLab