Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Simplify pattern match
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
  • Loading branch information
jkoritzinsky committed Sep 3, 2020
commit 50ad3356edb20f4bf72451f000591e9a2a7e96ff
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static bool HasOnlyBlittableFields(this ITypeSymbol type)
not { Type : { SpecialType : SpecialType.None }} => IsSpecialTypeBlittable(field.Type.SpecialType),
// Assume that type parameters that can be blittable are blittable.
// We'll re-evaluate blittability for generic fields of generic types at instantation time.
{ Type : ITypeParameterSymbol { IsReferenceType: false } t } => true,
{ Type : ITypeParameterSymbol } => true,
{ Type : { IsValueType : false }} => false,
// A recursive struct type isn't blittable.
// It's also illegal in C#, but I believe that source generators run
Expand Down