Slot tolerance: a record with unread slots is held read-only, not shed (#124)
This commit is contained in:
parent
c371832736
commit
a8c2825745
21 changed files with 1345 additions and 64 deletions
|
|
@ -20,7 +20,8 @@ var documents = new (Type Type, object Value)[]
|
|||
|
||||
foreach (var (type, _) in documents)
|
||||
{
|
||||
var formatter = options.Resolver.GetFormatterDynamic(type)!.GetType();
|
||||
// The guard wraps a measured type's formatter; the generated formatter it delegates to is the one that runs.
|
||||
var formatter = CultUnionGuard.Inner(options.Resolver.GetFormatterDynamic(type)!).GetType();
|
||||
if (formatter.Assembly.IsDynamic || !(formatter.FullName ?? "").Contains("GeneratedMessagePackResolver"))
|
||||
return Fail($"{type.Name} is formatted by {formatter.FullName}, not a generated formatter");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue