Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ public override bool SuppressVirtualCalls

public BoundConversion UpdateOperand(BoundExpression operand)
{
return this.Update(operand: operand, this.Conversion, this.IsBaseConversion, this.Checked, this.ExplicitCastInCode, this.ConstantValueOpt, this.ConversionGroupOpt, this.OriginalUserDefinedConversionsOpt, this.Type);
return this.Update(operand: operand, this.Conversion, this.IsBaseConversion, this.Checked, this.ExplicitCastInCode, this.ConstantValueOpt, this.ConversionGroupOpt, this.Type);
}

/// <summary>
Expand Down
4 changes: 0 additions & 4 deletions src/Compilers/CSharp/Portable/BoundTree/BoundNodes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -902,10 +902,6 @@
Conversion is represented by a single BoundConversion.
-->
<Field Name="ConversionGroupOpt" Type="ConversionGroup?"/>
<!--The set of method symbols from which this conversion's method was chosen.
Only kept in the tree if the conversion was an error and overload resolution
was unable to choose a best method.-->
<Field Name="OriginalUserDefinedConversionsOpt" Type="ImmutableArray&lt;MethodSymbol&gt;" Null="Allow" SkipInNullabilityRewriter="true"/>
</Node>

<!--
Expand Down
27 changes: 0 additions & 27 deletions src/Compilers/CSharp/Portable/BoundTree/Constructors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ public static BoundConversion SynthesizedNonUserDefined(SyntaxNode syntax, Bound
explicitCastInCode: false,
conversionGroupOpt: null,
constantValueOpt: constantValueOpt,
originalUserDefinedConversionsOpt: default,
type: type)
{ WasCompilerGenerated = true };
}
Expand Down Expand Up @@ -391,35 +390,9 @@ public BoundConversion(
explicitCastInCode: explicitCastInCode,
constantValueOpt: constantValueOpt,
conversionGroupOpt,
conversion.OriginalUserDefinedConversions,
type: type,
hasErrors: hasErrors || !conversion.IsValid)
{ }

public BoundConversion(
SyntaxNode syntax,
BoundExpression operand,
Conversion conversion,
bool isBaseConversion,
bool @checked,
bool explicitCastInCode,
ConstantValue? constantValueOpt,
ConversionGroup? conversionGroupOpt,
TypeSymbol type,
bool hasErrors = false) :
this(syntax, operand, conversion, isBaseConversion, @checked, explicitCastInCode, constantValueOpt, conversionGroupOpt, originalUserDefinedConversionsOpt: default, type, hasErrors)
{
}

public BoundConversion Update(BoundExpression operand,
Conversion conversion,
bool isBaseConversion,
bool @checked,
bool explicitCastInCode,
ConstantValue? constantValueOpt,
ConversionGroup? conversionGroupOpt,
TypeSymbol type)
=> Update(operand, conversion, isBaseConversion, @checked, explicitCastInCode, constantValueOpt, conversionGroupOpt, this.OriginalUserDefinedConversionsOpt, type);
}

internal sealed partial class BoundBinaryOperator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3534,7 +3534,7 @@ boundNode.ExpressionSymbol is Symbol accessSymbol &&
}
else if (conversion.ConversionKind.IsUserDefinedConversion())
{
GetSymbolsAndResultKind(conversion, conversion.SymbolOpt, conversion.OriginalUserDefinedConversionsOpt, out symbols, out resultKind);
GetSymbolsAndResultKind(conversion, conversion.SymbolOpt, conversion.Conversion.OriginalUserDefinedConversions, out symbols, out resultKind);
}
else
{
Expand Down

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