Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jcouv committed Apr 20, 2021
1 parent 9a64656 commit 46ec3ee
Show file tree
Hide file tree
Showing 10 changed files with 330 additions and 364 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3542,11 +3542,8 @@ private void AddSynthesizedRecordMembersIfNecessary(MembersAndInitializersBuilde
addToStringMethod(printMembers);

memberSignatures.Free();
<<<<<<< HEAD
fieldsByName.Free();
=======
memberNames.Free();
>>>>>>> dotnet/main

// We put synthesized record members first so that errors about conflicts show up on user-defined members rather than all
// going to the record declaration
Expand Down Expand Up @@ -3815,7 +3812,10 @@ ImmutableArray<Symbol> addProperties(ImmutableArray<ParameterSymbol> recordParam
&& field.TypeWithAnnotations.Equals(param.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions))
{
Binder.CheckFeatureAvailability(syntax, MessageID.IDS_FeaturePositionalFieldsInRecords, diagnostics);
existingOrAddedMembers.Add(field);
if (!isInherited || checkMemberNotHidden(field, param))

This comment has been minimized.

Copy link
@jcouv

jcouv Apr 20, 2021

Author Member

📝 This is the product code change required to adapt change from main (report error when hidden positional member is picked) to change from record-structs (fields can be picked as positional members).

{
existingOrAddedMembers.Add(field);
}
}
else if (existingMember is PropertySymbol { IsStatic: false, GetMethod: { } } prop
&& prop.TypeWithAnnotations.Equals(param.TypeWithAnnotations, TypeCompareKind.AllIgnoreOptions))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10667,13 +10667,15 @@ protected virtual bool PrintMembers(System.Text.StringBuilder builder)
Row(21, TableIndex.TypeRef, EditAndContinueOperation.Default),
Row(4, TableIndex.TypeSpec, EditAndContinueOperation.Default),
Row(3, TableIndex.StandAloneSig, EditAndContinueOperation.Default),
Row(10, TableIndex.MethodDef, EditAndContinueOperation.Default)); // R.PrintMembers
Row(10, TableIndex.MethodDef, EditAndContinueOperation.Default), // R.PrintMembers
Row(24, TableIndex.CustomAttribute, EditAndContinueOperation.Default));

This comment has been minimized.

Copy link
@jcouv

jcouv Apr 20, 2021

Author Member

@davidwengier I'm pushing latest bits from main branch into the record-structs branch. I believe this change is due to fixing nullability annotations on ToString/PrintMembers. Let me know if you think I should add some additional validation. Thanks

This comment has been minimized.

Copy link
@davidwengier

davidwengier Apr 20, 2021

Contributor

Thanks. Do you want me to see about adding record struct support to edit and continue in your branch? Or are you merging soon?

This comment has been minimized.

Copy link
@jcouv

jcouv Apr 20, 2021

Author Member

@davidwengier I'll be merging within a day or two, so probably better to wait. The feature will be in waiting pattern in the features/compiler branch until we finalize the branching strategy after post-16.10.


CheckEncMap(reader1,
Handle(19, TableIndex.TypeRef),
Handle(20, TableIndex.TypeRef),
Handle(21, TableIndex.TypeRef),
Handle(10, TableIndex.MethodDef),
Handle(24, TableIndex.CustomAttribute),
Handle(3, TableIndex.StandAloneSig),
Handle(4, TableIndex.TypeSpec),
Handle(2, TableIndex.AssemblyRef));
Expand Down
Loading

0 comments on commit 46ec3ee

Please sign in to comment.