Question: why List<int> property causes error: object containing type(s) must be partial?
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.7k
- Forks
- 313
- PR merge metrics
- No merged PRs in 30d
Description
using System;
using System.Collections.Generic;
using MemoryPack;
public class Program
{
public static void Main()
{
var person = new Person();
var bin = MemoryPackSerializer.Serialize(person);
}
[MemoryPackable]
public partial class Person
{
public List<int> IntItems { get; set; }
public List<string> StringItems { get; set; }
}
}
error MEMPACK042: The MemoryPackable object 'Person' containing type(s) must be partial
the docs says int, string, List<> are supported
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal C# reproduction in the issue and reproduce diagnostic MEMPACK042 for the MemoryPackable Person containing List and List properties. Trace the diagnostic's handling of these property types and compare it with the documented supported types; done means the behavior or its explanation is consistent with the docs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100