Skip to content

Commit

Permalink
Merge pull request #34673 from dotnet/merges/master-to-features/reado…
Browse files Browse the repository at this point in the history
…nly-members

Merge master to features/readonly-members
  • Loading branch information
dotnet-automerge-bot authored Apr 3, 2019
2 parents 9d83e27 + 4e746c1 commit 48ad407
Show file tree
Hide file tree
Showing 179 changed files with 4,924 additions and 901 deletions.
7 changes: 7 additions & 0 deletions Roslyn.sln
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.Exte
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.ExternalAccess.UnitTesting", "src\Tools\ExternalAccess\UnitTesting\Microsoft.CodeAnalysis.ExternalAccess.UnitTesting.csproj", "{FA51A3CB-5174-4D99-B76E-DC31C5361DF3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.ExternalAccess.Xamarin.Remote", "src\Tools\ExternalAccess\Xamarin.Remote\Microsoft.CodeAnalysis.ExternalAccess.Xamarin.Remote.csproj", "{DE53934B-7FC1-48A0-85AB-C519FBBD02CF}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
src\Compilers\VisualBasic\BasicAnalyzerDriver\BasicAnalyzerDriver.projitems*{2523d0e6-df32-4a3e-8ae0-a19bffae2ef6}*SharedItemsImports = 4
Expand Down Expand Up @@ -1057,6 +1059,10 @@ Global
{FA51A3CB-5174-4D99-B76E-DC31C5361DF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA51A3CB-5174-4D99-B76E-DC31C5361DF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA51A3CB-5174-4D99-B76E-DC31C5361DF3}.Release|Any CPU.Build.0 = Release|Any CPU
{DE53934B-7FC1-48A0-85AB-C519FBBD02CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE53934B-7FC1-48A0-85AB-C519FBBD02CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE53934B-7FC1-48A0-85AB-C519FBBD02CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE53934B-7FC1-48A0-85AB-C519FBBD02CF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1244,6 +1250,7 @@ Global
{A74C7D2E-92FA-490A-B80A-28BEF56B56FC} = {C52D8057-43AF-40E6-A01B-6CDBB7301985}
{655A5B07-39B8-48CD-8590-8AC0C2B708D8} = {8977A560-45C2-4EC2-A849-97335B382C74}
{FA51A3CB-5174-4D99-B76E-DC31C5361DF3} = {8977A560-45C2-4EC2-A849-97335B382C74}
{DE53934B-7FC1-48A0-85AB-C519FBBD02CF} = {8977A560-45C2-4EC2-A849-97335B382C74}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {604E6B91-7BC0-4126-AE07-D4D2FEFC3D29}
Expand Down
16 changes: 12 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ pr:

jobs:
- job: Windows_Desktop_Unit_Tests
pool: dotnet-external-temp-vs2019
pool:
name: NetCorePublic-Int-Pool
queue: BuildPool.Windows.10.Amd64.VS2017.Open
strategy:
maxParallel: 4
matrix:
Expand Down Expand Up @@ -90,7 +92,9 @@ jobs:
condition: not(succeeded())

- job: Windows_CoreClr_Unit_Tests
pool: dotnet-external-temp-vs2019
pool:
name: NetCorePublic-Int-Pool
queue: BuildPool.Windows.10.Amd64.VS2017.Open
strategy:
maxParallel: 2
matrix:
Expand Down Expand Up @@ -123,7 +127,9 @@ jobs:
condition: not(succeeded())

- job: Windows_Determinism_Test
pool: dotnet-external-temp-vs2019
pool:
name: NetCorePublic-Int-Pool
queue: BuildPool.Windows.10.Amd64.VS2017.Open
timeoutInMinutes: 90
steps:
- script: eng/test-determinism.cmd -configuration Debug
Expand All @@ -139,7 +145,9 @@ jobs:
condition: not(succeeded())

- job: Windows_Correctness_Test
pool: dotnet-external-temp-vs2019
pool:
name: NetCorePublic-Int-Pool
queue: BuildPool.Windows.10.Amd64.VS2017.Open
timeoutInMinutes: 90
steps:
- script: eng/test-build-correctness.cmd -configuration Release
Expand Down
3 changes: 3 additions & 0 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,8 @@ catch {
ExitWithExitCode 1
}
finally {
if ($ci) {
Stop-Processes
}
Pop-Location
}
1 change: 1 addition & 0 deletions eng/targets/Settings.props
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<TypeScriptKey>$(VisualStudioKey)</TypeScriptKey>
<RemoteLanguageServiceKey>$(VisualStudioKey)</RemoteLanguageServiceKey>
<VisualStudioDebuggerKey>$(VisualStudioKey)</VisualStudioDebuggerKey>
<XamarinKey>002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df</XamarinKey>
</PropertyGroup>

<!--
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"vs": {
"version": "16.0"
},
"xcopy-msbuild": "16.0.0-rc1-alpha"
"xcopy-msbuild": "16.0.0-alpha"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19171.3"
Expand Down
10 changes: 10 additions & 0 deletions src/Compilers/CSharp/Portable/Binder/Binder_Attributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,16 @@ private BoundExpression BindNamedAttributeArgument(AttributeArgumentSyntax named

ReportDiagnosticsIfObsolete(diagnostics, namedArgumentNameSymbol, namedArgument, hasBaseReceiver: false);

if (namedArgumentNameSymbol.Kind == SymbolKind.Property)
{
var propertySymbol = (PropertySymbol)namedArgumentNameSymbol;
var setMethod = propertySymbol.GetOwnOrInheritedSetMethod();
if (setMethod != null)
{
ReportDiagnosticsIfObsolete(diagnostics, setMethod, namedArgument, hasBaseReceiver: false);
}
}

Debug.Assert(resultKind == LookupResultKind.Viable || wasError);

TypeSymbol namedArgumentType;
Expand Down
20 changes: 18 additions & 2 deletions src/Compilers/CSharp/Portable/Binder/Binder_Lookup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,22 @@ private void LookupMembersInClass(
Binder originalBinder,
bool diagnose,
ref HashSet<DiagnosticInfo> useSiteDiagnostics)
{
LookupMembersInClass(result, type, name, arity, basesBeingResolved, options, originalBinder, type, diagnose, ref useSiteDiagnostics);
}

// Lookup member in a class, struct, enum, delegate.
private void LookupMembersInClass(
LookupResult result,
TypeSymbol type,
string name,
int arity,
ConsList<TypeSymbol> basesBeingResolved,
LookupOptions options,
Binder originalBinder,
TypeSymbol accessThroughType,
bool diagnose,
ref HashSet<DiagnosticInfo> useSiteDiagnostics)
{
Debug.Assert((object)type != null);
Debug.Assert(!type.IsInterfaceType() && type.TypeKind != TypeKind.TypeParameter);
Expand All @@ -694,7 +710,7 @@ private void LookupMembersInClass(
while ((object)currentType != null)
{
tmp.Clear();
LookupMembersWithoutInheritance(tmp, currentType, name, arity, options, originalBinder, type, diagnose, ref useSiteDiagnostics, basesBeingResolved);
LookupMembersWithoutInheritance(tmp, currentType, name, arity, options, originalBinder, accessThroughType, diagnose, ref useSiteDiagnostics, basesBeingResolved);

MergeHidingLookupResults(result, tmp, ref useSiteDiagnostics);

Expand Down Expand Up @@ -951,7 +967,7 @@ private void LookupMembersInInterface(LookupResult current, NamedTypeSymbol type
{
var tmp = LookupResult.GetInstance();
// NB: we assume use-site-errors on System.Object, if any, have been reported earlier.
this.LookupMembersInClass(tmp, this.Compilation.GetSpecialType(SpecialType.System_Object), name, arity, basesBeingResolved, options, originalBinder, diagnose, ref useSiteDiagnostics);
this.LookupMembersInClass(tmp, this.Compilation.GetSpecialType(SpecialType.System_Object), name, arity, basesBeingResolved, options, originalBinder, type, diagnose, ref useSiteDiagnostics);
MergeHidingLookupResults(current, tmp, ref useSiteDiagnostics);
tmp.Free();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/Binder/Binder_Patterns.cs
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ private BoundPattern BindVarDesignation(
}
case SyntaxKind.SingleVariableDesignation:
{
var declType = new TypeWithState(inputType, NullableFlowState.MaybeNull).ToTypeWithAnnotations();
var declType = TypeWithState.ForType(inputType).ToTypeWithAnnotations();
BindPatternDesignation(
designation: node, declType: declType, inputValEscape: inputValEscape, typeSyntax: null, diagnostics: diagnostics, hasErrors: ref hasErrors,
variableSymbol: out Symbol variableSymbol, variableAccess: out BoundExpression variableAccess);
Expand Down
18 changes: 18 additions & 0 deletions src/Compilers/CSharp/Portable/CSharpResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion src/Compilers/CSharp/Portable/CSharpResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -5862,4 +5862,10 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<data name="WRN_SwitchExpressionNotExhaustiveForNull_Title" xml:space="preserve">
<value>The switch expression does not handle some null inputs.</value>
</data>
</root>
<data name="ERR_AttributeNotOnEventAccessor" xml:space="preserve">
<value>Attribute '{0}' is not valid on event accessors. It is only valid on '{1}' declarations.</value>
</data>
<data name="IDS_FeatureObsoleteOnPropertyAccessor" xml:space="preserve">
<value>obsolete on property accessor</value>
</data>
</root>
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/Errors/ErrorCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ internal enum ErrorCode
ERR_PossibleAsyncIteratorWithoutYieldOrAwait = 8420,
ERR_StaticLocalFunctionCannotCaptureVariable = 8421,
ERR_StaticLocalFunctionCannotCaptureThis = 8422,

ERR_AttributeNotOnEventAccessor = 8423,
#region diagnostics introduced for recursive patterns
// 8501, // available
ERR_WrongNumberOfSubpatterns = 8502,
Expand Down
4 changes: 3 additions & 1 deletion src/Compilers/CSharp/Portable/Errors/MessageID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ internal enum MessageID
IDS_FeatureStaticLocalFunctions = MessageBase + 12755,
IDS_FeatureNameShadowingInNestedFunctions = MessageBase + 12756,
IDS_FeatureUnmanagedConstructedTypes = MessageBase + 12757,
IDS_FeatureReadOnlyMembers = MessageBase + 12758,
IDS_FeatureObsoleteOnPropertyAccessor = MessageBase + 12758,
IDS_FeatureReadOnlyMembers = MessageBase + 12759,

IDS_DefaultInterfaceImplementation = MessageBase + 12800,
IDS_BaseTypeInBaseExpression = MessageBase + 12801,
Expand Down Expand Up @@ -283,6 +284,7 @@ internal static LanguageVersion RequiredVersion(this MessageID feature)
case MessageID.IDS_FeatureStaticLocalFunctions:
case MessageID.IDS_FeatureNameShadowingInNestedFunctions:
case MessageID.IDS_FeatureUnmanagedConstructedTypes: // semantic check
case MessageID.IDS_FeatureObsoleteOnPropertyAccessor:
case MessageID.IDS_FeatureReadOnlyMembers:
case MessageID.IDS_DefaultInterfaceImplementation: // semantic check
case MessageID.IDS_BaseTypeInBaseExpression:
Expand Down
Loading

0 comments on commit 48ad407

Please sign in to comment.