提交 87b2e9f9 编写于 作者: P Petr Houska

Merge remote-tracking branch 'msft/release/dev16.4-preview1' into move-refa-to-helpers7

......@@ -8862,6 +8862,15 @@ internal class CSharpResources {
}
}
/// <summary>
/// Looks up a localized string similar to Type &apos;{0}&apos; cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the &apos;Embed Interop Types&apos; property to false..
/// </summary>
internal static string ERR_ReAbstractionInNoPIAType {
get {
return ResourceManager.GetString("ERR_ReAbstractionInNoPIAType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos;: &apos;readonly&apos; can only be used on accessors if the property or indexer has both a get and a set accessor.
/// </summary>
......
......@@ -5930,4 +5930,7 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<data name="ERR_DuplicateNullSuppression" xml:space="preserve">
<value>Duplicate null suppression operator ('!')</value>
</data>
<data name="ERR_ReAbstractionInNoPIAType" xml:space="preserve">
<value>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</value>
</data>
</root>
......@@ -233,10 +233,18 @@ internal override void ReportIndirectReferencesToLinkedAssemblies(AssemblySymbol
case TypeKind.Interface:
foreach (Symbol member in namedType.GetMembersUnordered())
{
if (member.Kind != SymbolKind.NamedType && !member.IsAbstract)
if (member.Kind != SymbolKind.NamedType)
{
error = ErrorCode.ERR_DefaultInterfaceImplementationInNoPIAType;
break;
if (!member.IsAbstract)
{
error = ErrorCode.ERR_DefaultInterfaceImplementationInNoPIAType;
break;
}
else if (member.IsSealed)
{
error = ErrorCode.ERR_ReAbstractionInNoPIAType;
break;
}
}
}
......
......@@ -1725,7 +1725,9 @@ internal enum ErrorCode
ERR_NotNullConstraintMustBeFirst = 8713,
WRN_NullabilityMismatchInTypeParameterNotNullConstraint = 8714,
ERR_DuplicateNullSuppression = 8715
ERR_DuplicateNullSuppression = 8715,
ERR_ReAbstractionInNoPIAType = 8750,
#endregion diagnostics introduced for C# 8.0
......
......@@ -352,6 +352,11 @@
<target state="translated">Dílčí vzor vlastnosti vyžaduje odkaz na vlastnost nebo pole k přiřazení, např. „{{ Name: {0} }}“.</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReadOnlyModMissingAccessor">
<source>'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</source>
<target state="new">'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</target>
......
......@@ -352,6 +352,11 @@
<target state="translated">Ein Eigenschaftsteilmuster erfordert einen Verweis auf die abzugleichende Eigenschaft oder das abzugleichende Feld. Beispiel: "{{ Name: {0} }}"</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReadOnlyModMissingAccessor">
<source>'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</source>
<target state="new">'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</target>
......
......@@ -352,6 +352,11 @@
<target state="translated">El subpatrón de una propiedad requiere una referencia a la propiedad o al campo que debe coincidir; por ejemplo, "{{ Name: {0} }}"</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReadOnlyModMissingAccessor">
<source>'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</source>
<target state="new">'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</target>
......
......@@ -352,6 +352,11 @@
<target state="translated">Un sous-modèle de propriété nécessite une correspondance de la référence à la propriété ou au champ. Exemple : '{{ Nom: {0} }}'</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReadOnlyModMissingAccessor">
<source>'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</source>
<target state="new">'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</target>
......
......@@ -352,6 +352,11 @@
<target state="translated">Con un criterio secondario di proprietà è richiesto un riferimento alla proprietà o al campo da abbinare, ad esempio '{{ Name: {0} }}'</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReadOnlyModMissingAccessor">
<source>'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</source>
<target state="new">'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</target>
......
......@@ -352,6 +352,11 @@
<target state="translated">プロパティ サブパターンには、一致させるプロパティまたはフィールドへの参照が必要です。例: '{{ Name: {0} }}'</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReadOnlyModMissingAccessor">
<source>'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</source>
<target state="new">'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</target>
......
......@@ -352,6 +352,11 @@
<target state="translated">속성 하위 패턴은 일치시킬 속성 또는 필드에 대한 참조가 필요합니다(예: '{{ Name: {0} }}')</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReadOnlyModMissingAccessor">
<source>'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</source>
<target state="new">'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</target>
......
......@@ -352,6 +352,11 @@
<target state="translated">Wzorzec podrzędny właściwości wymaga odwołania do właściwości lub pola, które należy dopasować, na przykład „{{ Name: {0} }}”</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReadOnlyModMissingAccessor">
<source>'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</source>
<target state="new">'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</target>
......
......@@ -352,6 +352,11 @@
<target state="translated">Um subpadrão de propriedade requer que uma referência à propriedade ou ao campo seja correspondida, por exemplo, '{{ Name: {0} }}'</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReadOnlyModMissingAccessor">
<source>'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</source>
<target state="new">'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</target>
......
......@@ -352,6 +352,11 @@
<target state="translated">Для вложенного шаблона свойств требуется ссылка на свойство или поле для сопоставления, например, "{{ Name: {0} }}".</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReadOnlyModMissingAccessor">
<source>'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</source>
<target state="new">'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</target>
......
......@@ -352,6 +352,11 @@
<target state="translated">Bir özellik alt deseni, özellik veya alan başvurusunun eşleşmesini gerektiriyor, ör. '{{ Name: {0} }}'</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReadOnlyModMissingAccessor">
<source>'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</source>
<target state="new">'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</target>
......
......@@ -377,6 +377,11 @@
<target state="translated">属性子模式需要引用要匹配的属性或字段,例如,"{{ Name: {0} }}"</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReadOnlyModMissingAccessor">
<source>'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</source>
<target state="new">'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</target>
......
......@@ -352,6 +352,11 @@
<target state="translated">屬性子模式需要對屬性或欄位的參考才能比對,例如 '{{ Name: {0} }}'</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReadOnlyModMissingAccessor">
<source>'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</source>
<target state="new">'{0}': 'readonly' can only be used on accessors if the property or indexer has both a get and a set accessor</target>
......
......@@ -44138,7 +44138,7 @@ public interface ITest33
}
}
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/35911")]
[Fact]
[WorkItem(35911, "https://github.com/dotnet/roslyn/issues/35911")]
public void NoPia_10()
{
......@@ -44187,9 +44187,9 @@ public static void Main(ITest44 x)
var compilation1 = CreateCompilation(consumer, options: TestOptions.ReleaseDll, references: new[] { reference, attributesRef }, targetFramework: TargetFramework.NetStandardLatest);
compilation1.VerifyEmitDiagnostics(
// (4,29): error CS8711: Type 'ITest44' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
// (4,29): error CS8750: Type 'ITest44' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.
// public static void Main(ITest44 x)
Diagnostic(ErrorCode.ERR_DefaultInterfaceImplementationInNoPIAType, "ITest44").WithArguments("ITest44").WithLocation(4, 29)
Diagnostic(ErrorCode.ERR_ReAbstractionInNoPIAType, "ITest44").WithArguments("ITest44").WithLocation(4, 29)
);
}
}
......@@ -189,11 +189,25 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Emit.NoPia
Dim id = ERRID.ERR_None
Select Case type.TypeKind
Case TypeKind.Interface,
TypeKind.Structure,
Case TypeKind.Interface
For Each member As Symbol In type.GetMembersUnordered()
If member.Kind <> SymbolKind.NamedType Then
If Not member.IsMustOverride Then
id = ERRID.ERR_DefaultInterfaceImplementationInNoPIAType
ElseIf member.IsNotOverridable Then
id = ERRID.ERR_ReAbstractionInNoPIAType
End If
End If
Next
If id = ERRID.ERR_None Then
GoTo checksForAllEmbedabbleTypes
End If
Case TypeKind.Structure,
TypeKind.Enum,
TypeKind.Delegate
checksForAllEmbedabbleTypes:
If type.IsTupleType Then
type = type.TupleUnderlyingType
End If
......
......@@ -1744,6 +1744,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
ERR_CommentsAfterLineContinuationNotAvailable1 = 37306
ERR_DefaultInterfaceImplementationInNoPIAType = 37307
ERR_ReAbstractionInNoPIAType = 37308
'// WARNINGS BEGIN HERE
WRN_UseOfObsoleteSymbol2 = 40000
WRN_InvalidOverrideDueToTupleNames2 = 40001
......
......@@ -2800,6 +2800,15 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type &apos;{0}&apos; cannot be embedded because it has a non-abstract member. Consider setting the &apos;Embed Interop Types&apos; property to false..
'''</summary>
Friend ReadOnly Property ERR_DefaultInterfaceImplementationInNoPIAType() As String
Get
Return ResourceManager.GetString("ERR_DefaultInterfaceImplementationInNoPIAType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Default member of &apos;{0}&apos; is not a property..
'''</summary>
......@@ -9584,6 +9593,15 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Type &apos;{0}&apos; cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the &apos;Embed Interop Types&apos; property to false..
'''</summary>
Friend ReadOnly Property ERR_ReAbstractionInNoPIAType() As String
Get
Return ResourceManager.GetString("ERR_ReAbstractionInNoPIAType", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to &apos;ReadOnly&apos; variable cannot be the target of an assignment..
'''</summary>
......
......@@ -5546,4 +5546,10 @@
<data name="ERR_MultipleAnalyzerConfigsInSameDir" xml:space="preserve">
<value>Multiple analyzer config files cannot be in the same directory ('{0}').</value>
</data>
<data name="ERR_DefaultInterfaceImplementationInNoPIAType" xml:space="preserve">
<value>Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</value>
</data>
<data name="ERR_ReAbstractionInNoPIAType" xml:space="preserve">
<value>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</value>
</data>
</root>
\ No newline at end of file
......@@ -7,11 +7,21 @@
<target state="new">Please use language version {0} or greater to use comments after line continuation character.</target>
<note />
</trans-unit>
<trans-unit id="ERR_DefaultInterfaceImplementationInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_MultipleAnalyzerConfigsInSameDir">
<source>Multiple analyzer config files cannot be in the same directory ('{0}').</source>
<target state="new">Multiple analyzer config files cannot be in the same directory ('{0}').</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="FEATURE_CommentsAfterLineContinuation">
<source>comments after line continuation</source>
<target state="new">comments after line continuation</target>
......
......@@ -7,11 +7,21 @@
<target state="new">Please use language version {0} or greater to use comments after line continuation character.</target>
<note />
</trans-unit>
<trans-unit id="ERR_DefaultInterfaceImplementationInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_MultipleAnalyzerConfigsInSameDir">
<source>Multiple analyzer config files cannot be in the same directory ('{0}').</source>
<target state="new">Multiple analyzer config files cannot be in the same directory ('{0}').</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="FEATURE_CommentsAfterLineContinuation">
<source>comments after line continuation</source>
<target state="new">comments after line continuation</target>
......
......@@ -7,11 +7,21 @@
<target state="new">Please use language version {0} or greater to use comments after line continuation character.</target>
<note />
</trans-unit>
<trans-unit id="ERR_DefaultInterfaceImplementationInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_MultipleAnalyzerConfigsInSameDir">
<source>Multiple analyzer config files cannot be in the same directory ('{0}').</source>
<target state="new">Multiple analyzer config files cannot be in the same directory ('{0}').</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="FEATURE_CommentsAfterLineContinuation">
<source>comments after line continuation</source>
<target state="new">comments after line continuation</target>
......
......@@ -7,11 +7,21 @@
<target state="new">Please use language version {0} or greater to use comments after line continuation character.</target>
<note />
</trans-unit>
<trans-unit id="ERR_DefaultInterfaceImplementationInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_MultipleAnalyzerConfigsInSameDir">
<source>Multiple analyzer config files cannot be in the same directory ('{0}').</source>
<target state="new">Multiple analyzer config files cannot be in the same directory ('{0}').</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="FEATURE_CommentsAfterLineContinuation">
<source>comments after line continuation</source>
<target state="new">comments after line continuation</target>
......
......@@ -7,11 +7,21 @@
<target state="new">Please use language version {0} or greater to use comments after line continuation character.</target>
<note />
</trans-unit>
<trans-unit id="ERR_DefaultInterfaceImplementationInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_MultipleAnalyzerConfigsInSameDir">
<source>Multiple analyzer config files cannot be in the same directory ('{0}').</source>
<target state="new">Multiple analyzer config files cannot be in the same directory ('{0}').</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="FEATURE_CommentsAfterLineContinuation">
<source>comments after line continuation</source>
<target state="new">comments after line continuation</target>
......
......@@ -7,11 +7,21 @@
<target state="new">Please use language version {0} or greater to use comments after line continuation character.</target>
<note />
</trans-unit>
<trans-unit id="ERR_DefaultInterfaceImplementationInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_MultipleAnalyzerConfigsInSameDir">
<source>Multiple analyzer config files cannot be in the same directory ('{0}').</source>
<target state="new">Multiple analyzer config files cannot be in the same directory ('{0}').</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="FEATURE_CommentsAfterLineContinuation">
<source>comments after line continuation</source>
<target state="new">comments after line continuation</target>
......
......@@ -7,11 +7,21 @@
<target state="new">Please use language version {0} or greater to use comments after line continuation character.</target>
<note />
</trans-unit>
<trans-unit id="ERR_DefaultInterfaceImplementationInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_MultipleAnalyzerConfigsInSameDir">
<source>Multiple analyzer config files cannot be in the same directory ('{0}').</source>
<target state="new">Multiple analyzer config files cannot be in the same directory ('{0}').</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="FEATURE_CommentsAfterLineContinuation">
<source>comments after line continuation</source>
<target state="new">comments after line continuation</target>
......
......@@ -7,11 +7,21 @@
<target state="new">Please use language version {0} or greater to use comments after line continuation character.</target>
<note />
</trans-unit>
<trans-unit id="ERR_DefaultInterfaceImplementationInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_MultipleAnalyzerConfigsInSameDir">
<source>Multiple analyzer config files cannot be in the same directory ('{0}').</source>
<target state="new">Multiple analyzer config files cannot be in the same directory ('{0}').</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="FEATURE_CommentsAfterLineContinuation">
<source>comments after line continuation</source>
<target state="new">comments after line continuation</target>
......
......@@ -7,11 +7,21 @@
<target state="new">Please use language version {0} or greater to use comments after line continuation character.</target>
<note />
</trans-unit>
<trans-unit id="ERR_DefaultInterfaceImplementationInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_MultipleAnalyzerConfigsInSameDir">
<source>Multiple analyzer config files cannot be in the same directory ('{0}').</source>
<target state="new">Multiple analyzer config files cannot be in the same directory ('{0}').</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="FEATURE_CommentsAfterLineContinuation">
<source>comments after line continuation</source>
<target state="new">comments after line continuation</target>
......
......@@ -7,11 +7,21 @@
<target state="new">Please use language version {0} or greater to use comments after line continuation character.</target>
<note />
</trans-unit>
<trans-unit id="ERR_DefaultInterfaceImplementationInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_MultipleAnalyzerConfigsInSameDir">
<source>Multiple analyzer config files cannot be in the same directory ('{0}').</source>
<target state="new">Multiple analyzer config files cannot be in the same directory ('{0}').</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="FEATURE_CommentsAfterLineContinuation">
<source>comments after line continuation</source>
<target state="new">comments after line continuation</target>
......
......@@ -7,11 +7,21 @@
<target state="new">Please use language version {0} or greater to use comments after line continuation character.</target>
<note />
</trans-unit>
<trans-unit id="ERR_DefaultInterfaceImplementationInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_MultipleAnalyzerConfigsInSameDir">
<source>Multiple analyzer config files cannot be in the same directory ('{0}').</source>
<target state="new">Multiple analyzer config files cannot be in the same directory ('{0}').</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="FEATURE_CommentsAfterLineContinuation">
<source>comments after line continuation</source>
<target state="new">comments after line continuation</target>
......
......@@ -7,11 +7,21 @@
<target state="new">Please use language version {0} or greater to use comments after line continuation character.</target>
<note />
</trans-unit>
<trans-unit id="ERR_DefaultInterfaceImplementationInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_MultipleAnalyzerConfigsInSameDir">
<source>Multiple analyzer config files cannot be in the same directory ('{0}').</source>
<target state="new">Multiple analyzer config files cannot be in the same directory ('{0}').</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="FEATURE_CommentsAfterLineContinuation">
<source>comments after line continuation</source>
<target state="new">comments after line continuation</target>
......
......@@ -7,11 +7,21 @@
<target state="new">Please use language version {0} or greater to use comments after line continuation character.</target>
<note />
</trans-unit>
<trans-unit id="ERR_DefaultInterfaceImplementationInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="ERR_MultipleAnalyzerConfigsInSameDir">
<source>Multiple analyzer config files cannot be in the same directory ('{0}').</source>
<target state="new">Multiple analyzer config files cannot be in the same directory ('{0}').</target>
<note />
</trans-unit>
<trans-unit id="ERR_ReAbstractionInNoPIAType">
<source>Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</source>
<target state="new">Type '{0}' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.</target>
<note />
</trans-unit>
<trans-unit id="FEATURE_CommentsAfterLineContinuation">
<source>comments after line continuation</source>
<target state="new">comments after line continuation</target>
......
......@@ -1672,8 +1672,15 @@ End Class
</compilation>
Dim comp1 = CreateCompilation(source1, targetFramework:=TargetFramework.NetStandardLatest, references:={attributesRef, csCompilation})
'https://github.com/dotnet/roslyn/issues/35852 Expect an error similar to - CS8711: Type 'ITest33' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
comp1.AssertTheseEmitDiagnostics()
comp1.AssertTheseEmitDiagnostics(
<expected>
BC37307: Type 'ITest33' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
Implements ITest33
~~~~~~~
BC37307: Type 'ITest33' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
Sub M1() Implements ITest33.M1
~~~~~~~
</expected>)
End Sub
<Fact>
......@@ -1712,8 +1719,12 @@ End Class
</compilation>
Dim comp1 = CreateCompilation(source1, targetFramework:=TargetFramework.NetStandardLatest, references:={attributesRef, csCompilation})
'https://github.com/dotnet/roslyn/issues/35852 Expect an error similar to - CS8711: Type 'ITest33' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
comp1.AssertTheseEmitDiagnostics()
comp1.AssertTheseEmitDiagnostics(
<expected>
BC37307: Type 'ITest33' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
Sub Main(x as ITest33)
~~~~~~~
</expected>)
End Sub
<Fact>
......@@ -1753,8 +1764,12 @@ End Class
</compilation>
Dim comp1 = CreateCompilation(source1, targetFramework:=TargetFramework.NetStandardLatest, references:={attributesRef, csCompilation})
'https://github.com/dotnet/roslyn/issues/35852 Expect an error similar to - CS8711: Type 'ITest33' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
comp1.AssertTheseEmitDiagnostics()
comp1.AssertTheseEmitDiagnostics(
<expected>
BC37307: Type 'ITest33' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
Sub Main(x as ITest33)
~~~~~~~
</expected>)
End Sub
<Fact>
......@@ -1793,8 +1808,12 @@ End Class
</compilation>
Dim comp1 = CreateCompilation(source1, targetFramework:=TargetFramework.NetStandardLatest, references:={attributesRef, csCompilation})
'https://github.com/dotnet/roslyn/issues/35852 Expect an error similar to - CS8711: Type 'ITest33' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
comp1.AssertTheseEmitDiagnostics()
comp1.AssertTheseEmitDiagnostics(
<expected>
BC37307: Type 'ITest33' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
Sub Main(x as ITest33)
~~~~~~~
</expected>)
End Sub
<Fact>
......@@ -1833,8 +1852,12 @@ End Class
</compilation>
Dim comp1 = CreateCompilation(source1, targetFramework:=TargetFramework.NetStandardLatest, references:={attributesRef, csCompilation})
'https://github.com/dotnet/roslyn/issues/35852 Expect an error similar to - CS8711: Type 'ITest33' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
comp1.AssertTheseEmitDiagnostics()
comp1.AssertTheseEmitDiagnostics(
<expected>
BC37307: Type 'ITest33' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
ITest33.M1()
~~~~~~~~~~~~
</expected>)
End Sub
<Fact>
......@@ -1919,10 +1942,9 @@ End Class
</compilation>
Dim comp1 = CreateCompilation(source1, targetFramework:=TargetFramework.NetStandardLatest, references:={attributesRef, csCompilation})
'https://github.com/dotnet/roslyn/issues/35852 Expect an error similar to - CS8711: Type 'ITest33' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
comp1.AssertTheseEmitDiagnostics(
<error>
BC31542: Embedded interop structure 'ITest33' can contain only public instance fields.
BC37307: Type 'ITest33' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
Dim x = ITest33.F1
~~~~~~~~~~
</error>
......@@ -1972,12 +1994,16 @@ End Class
</compilation>
Dim comp1 = CreateCompilation(source1, targetFramework:=TargetFramework.NetStandardLatest, references:={attributesRef, csCompilation})
'https://github.com/dotnet/roslyn/issues/35852 Expect an error similar to - CS8711: Type 'ITest44' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
comp1.AssertTheseEmitDiagnostics()
comp1.AssertTheseEmitDiagnostics(
<expected>
BC37307: Type 'ITest44' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
Sub Main(x as ITest44)
~~~~~~~
</expected>)
End Sub
<Fact>
<WorkItem(35852, "https://github.com/dotnet/roslyn/issues/35852")>
<WorkItem(35911, "https://github.com/dotnet/roslyn/issues/35911")>
Public Sub NoPia_10()
Dim attributesRef = GetCSharpCompilation(NoPiaAttributes).EmitToImageReference()
......@@ -2019,8 +2045,12 @@ End Class
</compilation>
Dim comp1 = CreateCompilation(source1, targetFramework:=TargetFramework.NetStandardLatest, references:={attributesRef, csCompilation})
'https://github.com/dotnet/roslyn/issues/35852 Expect an error similar to - CS8711: Type 'ITest44' cannot be embedded because it has a non-abstract member. Consider setting the 'Embed Interop Types' property to false.
comp1.AssertTheseEmitDiagnostics()
comp1.AssertTheseEmitDiagnostics(
<expected>
BC37308: Type 'ITest44' cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the 'Embed Interop Types' property to false.
Sub Main(x as ITest44)
~~~~~~~
</expected>)
End Sub
<ConditionalFact(GetType(WindowsOnly), Reason:=ConditionalSkipReason.NoPiaNeedsDesktop)>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册