-
Notifications
You must be signed in to change notification settings - Fork 851
Open
Labels
Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendIlxGen, ilwrite and things at the backendFeature Improvementgood first issuehelp wanted
Milestone
Description
Consider this F# code:
type I =
abstract M: param: outref<int> -> unit
type T() =
interface I with
member this.M(param) = failwith "todo"The param parameter is compiled as out parameter:
[CompilationMapping(SourceConstructFlags.ObjectType)]
[Serializable]
public interface I1
{
void M(out int param);
}
[CompilationMapping(SourceConstructFlags.ObjectType)]
[Serializable]
public class T1 : Program.I1
{
public T1()
{
Program.T1 t1 = this;
}
void Program.I1.M(out int param) => throw Operators.Failure("todo");
}Consider that the interface is coming from an IL assembly (e.g. from C# project):
public interface I2
{
void M(out int i);
}type T2() =
interface I2 with
member this.M(i) = failwith "todo"Now the parameter is being compiled as ref instead:
[CompilationMapping(SourceConstructFlags.ObjectType)]
[Serializable]
public class T2 : I2
{
public T2()
{
Program.T2 t2 = this;
}
void I2.M(ref int i) => throw Operators.Failure("todo");
}This doesn't seem to break anything at runtime, but the changed method signature is unexpected when working with FCS symbols and breaks a piece of analysis in our case.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendIlxGen, ilwrite and things at the backendFeature Improvementgood first issuehelp wanted
Type
Projects
Status
New