Skip to content

Commit 8fd32fe

Browse files
committed
Resolve merge conflicts
1 parent f5b488c commit 8fd32fe

36 files changed

+570
-895
lines changed

docs/features/DefaultInterfaceImplementation.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,7 @@ II.10.4 Method implementat ion requirements
134134
II.12 Semantics of interfaces
135135
Interfaces can have static fields and methods, but they shall not have instance fields or
136136
methods. Interfaces can define virtual methods, but only if those methods are abstract
137-
<<<<<<< HEAD
138-
(see Partition I and �II.15.4.2.4).
139-
=======
140137
(see Partition I and §II.15.4.2.4).
141-
>>>>>>> upstream/main
142138
II.12.2 Implement ing virtual methods on interfaces
143139
If the class defines any public virtual methods whose name and signature
144140
match a virtual method on the interface, then add these to the list for that
@@ -153,11 +149,7 @@ It follows that instance methods shall only be defined in classes or value types
153149
but not in interfaces or outside of a type (i.e., globally).
154150
II.22.27 MethodImpl : 0x19
155151
The method indexed by MethodBody shall be a member of Class or some base class
156-
<<<<<<< HEAD
157-
of Class (MethodImpls do not allow compilers to �hook� arbitrary method bodies)
158-
=======
159152
of Class (MethodImpls do not allow compilers to ‘hook’ arbitrary method bodies)
160-
>>>>>>> upstream/main
161153
II.22.37 TypeDef : 0x02
162154
All of the methods owned by an Interface (Flags.Interface = 1) shall be abstract
163155
(Flags.Abstract = 1)

src/Compilers/CSharp/Portable/CSharpResources.resx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,16 +363,14 @@
363363
<data name="IDS_FeatureTypeVariance" xml:space="preserve">
364364
<value>type variance</value>
365365
</data>
366-
<<<<<<< HEAD
367366
<data name="IDS_ParameterNullChecking" xml:space="preserve">
368367
<value>parameter null-checking</value>
369-
=======
368+
</data>
370369
<data name="IDS_Parameter" xml:space="preserve">
371370
<value>parameter</value>
372371
</data>
373372
<data name="IDS_Return" xml:space="preserve">
374373
<value>return</value>
375-
>>>>>>> upstream/main
376374
</data>
377375
<data name="XML_InvalidToken" xml:space="preserve">
378376
<value>The character(s) '{0}' cannot be used at this location.</value>

src/Compilers/CSharp/Portable/Compiler/MethodCompiler.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,6 @@ forSemanticModel.Syntax is { } semanticModelSyntax &&
12901290
boundStatements = boundStatements.Concat(ImmutableArray.Create(loweredBodyOpt));
12911291
}
12921292

1293-
<<<<<<< HEAD
12941293
var factory = new SyntheticBoundNodeFactory(methodSymbol, syntax, compilationState, diagsForCurrentMethod);
12951294

12961295
// Iterators handled in IteratorRewriter.cs
@@ -1311,10 +1310,7 @@ forSemanticModel.Syntax is { } semanticModelSyntax &&
13111310
}
13121311
}
13131312
}
1314-
if (!(methodSymbol is SynthesizedStaticConstructor cctor) || cctor.ShouldEmit(processedInitializers.BoundInitializers))
1315-
=======
13161313
if (_emitMethodBodies && (!(methodSymbol is SynthesizedStaticConstructor cctor) || cctor.ShouldEmit(processedInitializers.BoundInitializers)))
1317-
>>>>>>> upstream/main
13181314
{
13191315
var boundBody = BoundStatementList.Synthesized(syntax, boundStatements);
13201316

src/Compilers/CSharp/Portable/Errors/ErrorCode.cs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,17 +1882,6 @@ internal enum ErrorCode
18821882
ERR_CopyConstructorWrongAccessibility = 8878,
18831883
ERR_NonPrivateAPIInRecord = 8879,
18841884

1885-
<<<<<<< HEAD
1886-
ERR_IncorrectNullCheckSyntax = 8890,
1887-
ERR_MustNullCheckInImplementation = 8891,
1888-
ERR_NonNullableValueTypeIsNullChecked = 8892,
1889-
WRN_NullCheckedHasDefaultNull = 8893,
1890-
ERR_NullCheckingOnByRefParameter = 8894,
1891-
WRN_NullCheckingOnNullableValueType = 8895,
1892-
1893-
#endregion diagnostics introduced for C# 9.0
1894-
1895-
=======
18961885
// The following warnings correspond to errors of the same name, but are reported
18971886
// when a definite assignment issue is reported due to private fields imported from metadata.
18981887
WRN_UnassignedThisAutoProperty = 8880,
@@ -2012,9 +2001,15 @@ internal enum ErrorCode
20122001
WRN_MethGrpToNonDel = 8974,
20132002
ERR_LambdaExplicitReturnTypeVar = 8975,
20142003

2004+
ERR_IncorrectNullCheckSyntax = 8990,
2005+
ERR_MustNullCheckInImplementation = 8991,
2006+
ERR_NonNullableValueTypeIsNullChecked = 8992,
2007+
WRN_NullCheckedHasDefaultNull = 8993,
2008+
ERR_NullCheckingOnByRefParameter = 8994,
2009+
WRN_NullCheckingOnNullableValueType = 8995,
2010+
20152011
#endregion
20162012

2017-
>>>>>>> upstream/main
20182013
// Note: you will need to re-generate compiler code after adding warnings (eng\generate-compiler-code.cmd)
20192014
}
20202015
}

src/Compilers/CSharp/Portable/Errors/MessageID.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,6 @@ internal enum MessageID
208208
IDS_FeatureNullPointerConstantPattern = MessageBase + 12783,
209209
IDS_FeatureModuleInitializers = MessageBase + 12784,
210210
IDS_FeatureTargetTypedConditional = MessageBase + 12785,
211-
<<<<<<< HEAD
212-
213-
IDS_ParameterNullChecking = MessageBase + 12786,
214-
=======
215211
IDS_FeatureCovariantReturnsForOverrides = MessageBase + 12786,
216212
IDS_FeatureExtensionGetEnumerator = MessageBase + 12787,
217213
IDS_FeatureExtensionGetAsyncEnumerator = MessageBase + 12788,
@@ -240,7 +236,7 @@ internal enum MessageID
240236
IDS_FeatureParameterlessStructConstructors = MessageBase + 12810,
241237
IDS_FeatureStructFieldInitializers = MessageBase + 12811,
242238
IDS_FeatureGenericAttributes = MessageBase + 12812,
243-
>>>>>>> upstream/main
239+
IDS_ParameterNullChecking = MessageBase + 12813,
244240
}
245241

246242
// Message IDs may refer to strings that need to be localized.

src/Compilers/CSharp/Portable/Generated/CSharpSyntaxGenerator/CSharpSyntaxGenerator.SourceGenerator/Syntax.xml.Syntax.Generated.cs

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13095,23 +13095,15 @@ public ParameterSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, Sy
1309513095
return this;
1309613096
}
1309713097

13098-
<<<<<<< HEAD:src/Compilers/CSharp/Portable/Generated/Syntax.xml.Syntax.Generated.cs
13099-
public ParameterSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.Modifiers, this.Type, this.Identifier, this.ExclamationExclamationToken, this.Default);
13100-
public ParameterSyntax WithModifiers(SyntaxTokenList modifiers) => Update(this.AttributeLists, modifiers, this.Type, this.Identifier, this.ExclamationExclamationToken, this.Default);
13101-
public ParameterSyntax WithType(TypeSyntax? type) => Update(this.AttributeLists, this.Modifiers, type, this.Identifier, this.ExclamationExclamationToken, this.Default);
13102-
public ParameterSyntax WithIdentifier(SyntaxToken identifier) => Update(this.AttributeLists, this.Modifiers, this.Type, identifier, this.ExclamationExclamationToken, this.Default);
13103-
public ParameterSyntax WithExclamationExclamationToken(SyntaxToken exclamationExclamationToken) => Update(this.AttributeLists, this.Modifiers, this.Type, this.Identifier, exclamationExclamationToken, this.Default);
13104-
public ParameterSyntax WithDefault(EqualsValueClauseSyntax? @default) => Update(this.AttributeLists, this.Modifiers, this.Type, this.Identifier, this.ExclamationExclamationToken, @default);
13105-
=======
1310613098
internal override BaseParameterSyntax WithAttributeListsCore(SyntaxList<AttributeListSyntax> attributeLists) => WithAttributeLists(attributeLists);
13107-
public new ParameterSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.Modifiers, this.Type, this.Identifier, this.Default);
13099+
public new ParameterSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.Modifiers, this.Type, this.Identifier, this.ExclamationExclamationToken, this.Default);
1310813100
internal override BaseParameterSyntax WithModifiersCore(SyntaxTokenList modifiers) => WithModifiers(modifiers);
13109-
public new ParameterSyntax WithModifiers(SyntaxTokenList modifiers) => Update(this.AttributeLists, modifiers, this.Type, this.Identifier, this.Default);
13101+
public new ParameterSyntax WithModifiers(SyntaxTokenList modifiers) => Update(this.AttributeLists, modifiers, this.Type, this.Identifier, this.ExclamationExclamationToken, this.Default);
1311013102
internal override BaseParameterSyntax WithTypeCore(TypeSyntax? type) => WithType(type);
13111-
public new ParameterSyntax WithType(TypeSyntax? type) => Update(this.AttributeLists, this.Modifiers, type, this.Identifier, this.Default);
13112-
public ParameterSyntax WithIdentifier(SyntaxToken identifier) => Update(this.AttributeLists, this.Modifiers, this.Type, identifier, this.Default);
13113-
public ParameterSyntax WithDefault(EqualsValueClauseSyntax? @default) => Update(this.AttributeLists, this.Modifiers, this.Type, this.Identifier, @default);
13114-
>>>>>>> upstream/main:src/Compilers/CSharp/Portable/Generated/CSharpSyntaxGenerator/CSharpSyntaxGenerator.SourceGenerator/Syntax.xml.Syntax.Generated.cs
13103+
public new ParameterSyntax WithType(TypeSyntax? type) => Update(this.AttributeLists, this.Modifiers, type, this.Identifier, this.ExclamationExclamationToken, this.Default);
13104+
public ParameterSyntax WithIdentifier(SyntaxToken identifier) => Update(this.AttributeLists, this.Modifiers, this.Type, identifier, this.ExclamationExclamationToken, this.Default);
13105+
public ParameterSyntax WithExclamationExclamationToken(SyntaxToken exclamationExclamationToken) => Update(this.AttributeLists, this.Modifiers, this.Type, this.Identifier, exclamationExclamationToken, this.Default);
13106+
public ParameterSyntax WithDefault(EqualsValueClauseSyntax? @default) => Update(this.AttributeLists, this.Modifiers, this.Type, this.Identifier, this.ExclamationExclamationToken, @default);
1311513107

1311613108
internal override BaseParameterSyntax AddAttributeListsCore(params AttributeListSyntax[] items) => AddAttributeLists(items);
1311713109
public new ParameterSyntax AddAttributeLists(params AttributeListSyntax[] items) => WithAttributeLists(this.AttributeLists.AddRange(items));

src/Compilers/CSharp/Portable/Generated/ErrorFacts.Generated.cs

Lines changed: 2 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter.cs

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -253,23 +253,18 @@ public override BoundNode VisitLambda(BoundLambda node)
253253
var oldInstrumenter = _instrumenter;
254254
try
255255
{
256-
<<<<<<< HEAD
257-
_factory.CurrentFunction = node.Symbol;
258-
var visited = (BoundLambda)base.VisitLambda(node)!;
256+
_factory.CurrentFunction = lambda;
257+
if (lambda.IsDirectlyExcludedFromCodeCoverage)
258+
{
259+
_instrumenter = RemoveDynamicAnalysisInjectors(oldInstrumenter);
260+
}
259261

262+
var visited = (BoundLambda)base.VisitLambda(node)!;
260263
if (RewriteNullChecking(visited.Body) is BoundBlock newBody)
261264
{
262265
visited = visited.Update(visited.UnboundLambda, visited.Symbol, newBody, visited.Diagnostics, visited.Binder, visited.Type);
263266
}
264267
return visited;
265-
=======
266-
_factory.CurrentFunction = lambda;
267-
if (lambda.IsDirectlyExcludedFromCodeCoverage)
268-
{
269-
_instrumenter = RemoveDynamicAnalysisInjectors(oldInstrumenter);
270-
}
271-
return base.VisitLambda(node)!;
272-
>>>>>>> upstream/main
273268
}
274269
finally
275270
{
@@ -326,15 +321,6 @@ static bool hasReturnTypeOrParameter(LocalFunctionSymbol localFunction, Func<Typ
326321
_instrumenter = RemoveDynamicAnalysisInjectors(oldInstrumenter);
327322
}
328323

329-
<<<<<<< HEAD
330-
var visited = (BoundLocalFunctionStatement)base.VisitLocalFunctionStatement(node)!;
331-
332-
if (!localFunction.IsIterator && RewriteNullChecking(visited.Body) is BoundBlock newBody)
333-
{
334-
visited = visited.Update(localFunction, newBody, null);
335-
}
336-
return visited;
337-
=======
338324
if (localFunction.IsGenericMethod)
339325
{
340326
// Each generic local function gets its own dynamic factory because it
@@ -343,8 +329,13 @@ static bool hasReturnTypeOrParameter(LocalFunctionSymbol localFunction, Func<Typ
343329
_dynamicFactory = new LoweredDynamicOperationFactory(_factory, _dynamicFactory.MethodOrdinal, localFunctionOrdinal);
344330
}
345331

346-
return base.VisitLocalFunctionStatement(node)!;
347-
>>>>>>> upstream/main
332+
var visited = (BoundLocalFunctionStatement)base.VisitLocalFunctionStatement(node)!;
333+
334+
if (!localFunction.IsIterator && RewriteNullChecking(visited.Body) is BoundBlock newBody)
335+
{
336+
visited = visited.Update(localFunction, newBody, null);
337+
}
338+
return visited;
348339
}
349340
finally
350341
{

src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_BinaryOperator.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,11 +1799,7 @@ private MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nulla
17991799
/// Recommendation: Do not use, use <see cref="TryGetNullableMethod"/> instead!
18001800
/// If used, a unit-test with a missing member is absolutely a must have.
18011801
/// </summary>
1802-
<<<<<<< HEAD
1803-
internal static MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member, CSharpCompilation compilation, DiagnosticBag diagnostics)
1804-
=======
18051802
private static MethodSymbol UnsafeGetNullableMethod(SyntaxNode syntax, TypeSymbol nullableType, SpecialMember member, CSharpCompilation compilation, BindingDiagnosticBag diagnostics)
1806-
>>>>>>> upstream/main
18071803
{
18081804
var nullableType2 = nullableType as NamedTypeSymbol;
18091805
Debug.Assert(nullableType2 is { });

0 commit comments

Comments
 (0)