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
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/CSharpResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,7 @@ If such a class is used as a base class and if the deriving class defines a dest
<data name="ERR_PredefinedValueTupleTypeNotFound" xml:space="preserve">
<value>Predefined type '{0}' is not defined or imported</value>
</data>
<data name="ERR_PredefinedValueTupleTypeAmbiguous3" xml:space="preserve">
<data name="ERR_PredefinedTypeAmbiguous" xml:space="preserve">
<value>Predefined type '{0}' is declared in multiple referenced assemblies: '{1}' and '{2}'</value>
</data>
<data name="ERR_StructWithBaseConstructorCall" xml:space="preserve">
Expand Down
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 @@ -1544,7 +1544,7 @@ internal enum ErrorCode
ERR_OutAttrOnInParam = 8355,
#endregion diagnostics introduced for `ref readonly`, `ref conditional` and `ref-like` features in C# 7.2

ERR_PredefinedValueTupleTypeAmbiguous3 = 8356,
ERR_PredefinedTypeAmbiguous = 8356,
ERR_InvalidVersionFormatDeterministic = 8357,
ERR_AttributeCtorInParameter = 8358,

Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/Errors/ErrorFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1868,7 +1868,7 @@ or ErrorCode.ERR_EscapeVariable
or ErrorCode.ERR_EscapeStackAlloc
or ErrorCode.ERR_RefReturnThis
or ErrorCode.ERR_OutAttrOnInParam
or ErrorCode.ERR_PredefinedValueTupleTypeAmbiguous3
or ErrorCode.ERR_PredefinedTypeAmbiguous
or ErrorCode.ERR_InvalidVersionFormatDeterministic
or ErrorCode.ERR_AttributeCtorInParameter
or ErrorCode.WRN_FilterIsConstantFalse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,25 +154,27 @@ internal NamedTypeSymbol GetWellKnownType(WellKnownType type)
if (result is null)
{
MetadataTypeName emittedName = MetadataTypeName.FromFullName(mdName, useCLSCompliantNameArityEncoding: true);
if (type.IsValueTupleType())

CSDiagnosticInfo? errorInfo;
if (conflicts is ({ } conflict1, { } conflict2))
{
CSDiagnosticInfo errorInfo;
if (conflicts.Item1 is null)
errorInfo = new CSDiagnosticInfo(ErrorCode.ERR_PredefinedTypeAmbiguous, emittedName.FullName, conflict1, conflict2);
}
else
{
Debug.Assert(conflicts is (null, null));

if (type.IsValueTupleType())
{
Debug.Assert(conflicts.Item2 is null);
errorInfo = new CSDiagnosticInfo(ErrorCode.ERR_PredefinedValueTupleTypeNotFound, emittedName.FullName);
}
else
{
errorInfo = new CSDiagnosticInfo(ErrorCode.ERR_PredefinedValueTupleTypeAmbiguous3, emittedName.FullName, conflicts.Item1, conflicts.Item2);
errorInfo = null;
}

result = new MissingMetadataTypeSymbol.TopLevel(this.Assembly.Modules[0], ref emittedName, type, errorInfo);
}
else
{
result = new MissingMetadataTypeSymbol.TopLevel(this.Assembly.Modules[0], ref emittedName, type);
}

result = new MissingMetadataTypeSymbol.TopLevel(this.Assembly.Modules[0], ref emittedName, type, errorInfo);
}

if (Interlocked.CompareExchange(ref _lazyWellKnownTypes[index], result, null) is object)
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/xlf/CSharpResources.cs.xlf

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

2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/xlf/CSharpResources.de.xlf

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

2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/xlf/CSharpResources.es.xlf

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

2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/xlf/CSharpResources.fr.xlf

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

2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/xlf/CSharpResources.it.xlf

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

2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/xlf/CSharpResources.ja.xlf

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

2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/xlf/CSharpResources.ko.xlf

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

2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/xlf/CSharpResources.pl.xlf

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

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

2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/xlf/CSharpResources.ru.xlf

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

2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/xlf/CSharpResources.tr.xlf

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

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

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

Loading