Skip to content

Source Generator can generate wrong FastClonerContext implementation #37

@AlleSchonWeg

Description

@AlleSchonWeg

Hi,
i'm testing FastCloner.SourceGenerator and the FastClonerContext implementation. But the IsHandled method can be wrong.
Source generator creates this code:

// <auto-generated/>
// Generated: 2026-03-23 12:49:59 UTC
#nullable enable

using System;
using System.Collections.Generic;
using System.Reflection;
using FastCloner;

namespace MyNameSpace
{
    public partial class MyCloningContext
    {
        ...
        public override bool IsHandled(Type type) 
        {
            return false;
        }
    }
}

The problem is i have Type as a enum in MyNameSpace:

public enum Type
{
    A,
    B,
    C
}

I think it should be:

public override bool IsHandled(System.Type type) 
{
    return false;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions