Skip to content

WithBaseCall will use the parameter's type instead of its name #4

@zsr2531

Description

@zsr2531

Very easy repro:

var builder = CodeBuilder.Create("MyApp")
	.AddClass("Test")
	.MakePublicClass()
	.SetBaseClass("MyBaseType")
		.AddConstructor(Accessibility.Public)
			.AddParameter("string", "thing")
			.WithBaseCall(new Dictionary<string, string>
			{
				["thing"] = "thing"
			})
		.Class;

string code = builder.Build();

This will result in the following code:

namespace MyApp
{
	public partial class Test : MyBaseType
	{
		public Test(string thing) : base(string)
		{
		}
	}
}

So basically instead of using the parameter name, it will use the parameter's type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions