Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fixup! Disable implicit conversions, that might lose information:
fixes for #1568
  • Loading branch information
lostmsu committed Sep 27, 2021
commit dd41fccba6387148b9a5d044adbe840dd400f53a
8 changes: 7 additions & 1 deletion src/runtime/converter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,12 @@ internal static bool ToManagedValue(IntPtr value, Type obType,
}
result = cb.type.Value;
return true;

case null:
break;

default:
throw new ArgumentException("We should never receive instances of other managed types");
}

if (value == Runtime.PyNone && !obType.IsValueType)
Expand Down Expand Up @@ -513,7 +519,7 @@ internal static bool ToManagedValue(IntPtr value, Type obType,
{
if (setError)
{
Exceptions.SetError(ex.InnerException);
Exceptions.SetError(ex);
}
return null;
}
Expand Down