提交 e14d07c9 编写于 作者: T TomasMatousek

If an assembly has "global" alias don't qualify namespace name in PDB with an...

If an assembly has "global" alias don't qualify namespace name in PDB with an extern alias. (changeset 1407218)
上级 1b134bcc
......@@ -155,14 +155,15 @@ private string GuessExternAlias(NamespaceSymbol @namespace, HashSet<string> vali
ImmutableArray<string> aliases = reference.Properties.Aliases;
if (!aliases.IsDefaultOrEmpty)
{
if (aliases.Contains(MetadataReferenceProperties.GlobalAlias))
{
// If the namespace can be referenced without alias qualification, don't use any.
return null;
}
foreach (string alias in aliases)
{
if (alias == MetadataReferenceProperties.GlobalAlias)
{
// Don't bother explicitly emitting "global".
return null;
}
else if (validAliases.Contains(alias))
if (validAliases.Contains(alias))
{
// CONSIDER: Dev12 uses the one that appeared in source, whereas we use
// the first one that COULD have appeared in source. (DevDiv #913022)
......
......@@ -516,7 +516,7 @@ class C { void M() { } }
<extern alias=""A""/>
<extern alias=""B""/>
<alias name=""X"" target=""N"" kind=""namespace""/>
<alias name=""Y"" qualifier=""B"" target=""N"" kind=""namespace""/>
<alias name=""Y"" target=""N"" kind=""namespace""/>
<alias name=""Z"" target=""N"" kind=""namespace""/>
<externinfo alias=""A"" assembly=""A, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null""/>
<externinfo alias=""B"" assembly=""B, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null""/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册