Skip to content

A typo in the article #86

Description

@Svarshick

Hey, I don't know where else to write
In your article about source generators code of the GetEnumToGenerate (part 7) has extra lines in the end of the method

    . . .
    // Get all the fields from the enum, and add their name to the list
    foreach (ISymbol member in enumMembers)
    {
        if (member is IFieldSymbol field && field.ConstantValue is not null)
        {
            members.Add(member.Name);
        }
    }

    // Extra lines from here  

    // Create an EnumToGenerate for use in the generation phase
    enumsToGenerate.Add(new EnumToGenerate(enumName, members));

    foreach (ISymbol member in enumMembers)
    {
        if (member is IFieldSymbol field && field.ConstantValue is not null)
        {
            members.Add(member.Name);
        }
    }
   
    // To here

    return new EnumToGenerate(enumName, members);

It differs from code in repository

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions