Fixed type lookup in GetClassTypReference.
Mixed normal/portal assemblies make that necessary.
This commit is contained in:
Родитель
8e4cae8ae5
Коммит
5118b41d36
|
@ -98,20 +98,20 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
|
|||
if (context.CurrentAssembly != null) {
|
||||
type = context.CurrentAssembly.GetTypeDefinition(fullTypeName);
|
||||
}
|
||||
if (type == null) {
|
||||
var compilation = context.Compilation;
|
||||
foreach (var asm in compilation.Assemblies) {
|
||||
type = asm.GetTypeDefinition(fullTypeName);
|
||||
if (type != null)
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
IAssembly asm = assembly.Resolve(context);
|
||||
if (asm != null) {
|
||||
type = asm.GetTypeDefinition(fullTypeName);
|
||||
}
|
||||
}
|
||||
if (type == null) {
|
||||
var compilation = context.Compilation;
|
||||
foreach (var asm in compilation.Assemblies) {
|
||||
type = asm.GetTypeDefinition(fullTypeName);
|
||||
if (type != null)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return type ?? new UnknownType(fullTypeName);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче