Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/NRefactory.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2014-08-05 20:06:14 +0400
committerMike Krüger <mkrueger@xamarin.com>2014-08-05 20:06:14 +0400
commit5118b41d3606a95a7e623dd06981a33b0d550c9d (patch)
treef7c58eef29abd9247f17f27b85c09c988121a4a5 /ICSharpCode.NRefactory
parent8e4cae8ae50b8e991cb11910d545ae7ba6dc3803 (diff)
Fixed type lookup in GetClassTypReference.
Mixed normal/portal assemblies make that necessary.
Diffstat (limited to 'ICSharpCode.NRefactory')
-rw-r--r--ICSharpCode.NRefactory/TypeSystem/Implementation/GetClassTypeReference.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/GetClassTypeReference.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/GetClassTypeReference.cs
index c3940111..d1de23d6 100644
--- a/ICSharpCode.NRefactory/TypeSystem/Implementation/GetClassTypeReference.cs
+++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/GetClassTypeReference.cs
@@ -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);
}