Fixed copy/paste bug. A typeref pointing to ModuleRef should resolve the type in that module, not the assembly.

This commit is contained in:
jfrijters 2011-01-13 06:39:18 +00:00
Родитель 6d9125b9c8
Коммит c4e645f733
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -388,7 +388,7 @@ namespace IKVM.Reflection.Reader
{
Module module = ResolveModuleRef(ModuleRef.records[(scope & 0xFFFFFF) - 1]);
string typeName = GetTypeName(TypeRef.records[index].TypeNameSpace, TypeRef.records[index].TypeName);
Type type = assembly.GetType(typeName);
Type type = module.GetType(typeName);
if (type == null)
{
throw new TypeLoadException(String.Format("Type '{0}' not found in module '{1}'", typeName, module.Name));