Skip to content

[mono][hotreload] Adding a new field didn't work #86172

Description

@thaystg

Program.cs:

public class EntryPoint
{
public static void Main(string[] args)
{
try
{
AddProperty1.Main2(); // line 7
Console.Write("\f");
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}
}
}

OtherClass.cs

public class AddProperty1
{
public static void Main2()
{
}
}

Add a breakpoint on line 7 of Program.cs.
Run the program, once it's paused, go to OtherClass.cs and replace the content to:

public class AddProperty1
{
private static int A { get; set; }
public static void Main2()
{
A = 11;
System.Console.WriteLine(A);
}
}

Mono runtime crashes:
image

field->type is NULL

Metadata

Metadata

Assignees

Labels

area-EnC-monoHot Reload for WebAssembly, iOS/Android, etc

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions