VB: Report access to members of an interface that are not supported by runtime.#38288
VB: Report access to members of an interface that are not supported by runtime.#38288AlekseyTs merged 2 commits intodotnet:masterfrom
Conversation
…y runtime. Fixes dotnet#35834. Fixes dotnet#35885. Also addresses some scenarios related to dotnet#35824.
|
@dotnet/roslyn-compiler Please review |
| <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> | ||
| <data name="ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation" xml:space="preserve"> | ||
| <value>Target runtime doesn't support default interface implementation.</value> |
There was a problem hiding this comment.
implementation [](start = 60, length = 14)
Should this be pluralized? #Resolved
There was a problem hiding this comment.
Should this be pluralized?
Either way makes no difference to me. The error message is copied from C# compiler , BTW.
In reply to: 317831806 [](ancestors = 317831806)
|
|
||
| If symbol.Kind <> SymbolKind.Property AndAlso | ||
| Compilation.SourceModule IsNot symbol.ContainingModule AndAlso | ||
| symbol.ContainingType?.IsInterface AndAlso |
There was a problem hiding this comment.
symbol.ContainingType?.IsInterface [](start = 15, length = 34)
Nit: This nullable bool will cause the whole condition to get thrown into a bool?, consider explicitly comparing with true. (Side note: VB allows this?) #Pending
There was a problem hiding this comment.
VB allows this?
Yes. See section "11.19 Boolean Expressions" in the language specification
This nullable bool will cause the whole condition to get thrown into a bool?, consider explicitly comparing with true.
This wouldn't make any difference in terms of types in VB because comparing anything with Null is Null in VB, therefore the type of the comparison would be Boolean? as well.
However, the code generated might be slightly better if I call GetValueOrDefault explicitly here.
In reply to: 317833083 [](ancestors = 317833083)
333fred
left a comment
There was a problem hiding this comment.
LGTM (commit 1), other than noted nits.
|
@dotnet/roslyn-compiler Please review, need a second sign-off. |
5 similar comments
|
@dotnet/roslyn-compiler Please review, need a second sign-off. |
|
@dotnet/roslyn-compiler Please review, need a second sign-off. |
|
@dotnet/roslyn-compiler Please review, need a second sign-off. |
|
@dotnet/roslyn-compiler Please review, need a second sign-off. |
|
@dotnet/roslyn-compiler Please review, need a second sign-off. |
Fixes #35834. Fixes #35885.
Also addresses some scenarios related to #35824.