Skip to content

Commit 8edd15d

Browse files
committed
Fix Basic type lookup
1 parent c58659d commit 8edd15d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/NHibernate/Type/TypeFactory.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -566,13 +566,13 @@ public static IType HeuristicType(string typeName, IDictionary<string, string> p
566566
/// </summary>
567567
private static IType HeuristicType(System.Type resolvedType, string typeName, IDictionary<string, string> parameters, int? length)
568568
{
569-
if (resolvedType == null)
570-
{
571-
IType type = Basic(typeName, parameters);
569+
IType type = Basic(resolvedType?.AssemblyQualifiedName ?? typeName, parameters);
572570

573-
if (type != null)
574-
return type;
571+
if (type != null)
572+
return type;
575573

574+
if (resolvedType == null)
575+
{
576576
string[] parsedTypeName;
577577
var typeClassification = GetTypeClassification(typeName);
578578
if (typeClassification == TypeClassification.LengthOrScale)
@@ -601,7 +601,7 @@ private static IType HeuristicType(System.Type resolvedType, string typeName, ID
601601
{
602602
try
603603
{
604-
var type = (IType) Environment.ObjectsFactory.CreateInstance(typeClass);
604+
type = (IType) Environment.ObjectsFactory.CreateInstance(typeClass);
605605
InjectParameters(type, parameters);
606606

607607
var obsolete = typeClass.GetCustomAttribute<ObsoleteAttribute>(false);

0 commit comments

Comments
 (0)