Last active
August 29, 2015 14:08
-
-
Save eiriktsarpalis/197499e416227f7f91ff to your computer and use it in GitHub Desktop.
Code generated by F# compiler in https://gist.github.com/eiriktsarpalis/ec4a108444a91c0e7e8f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Repro | |
{ | |
[CompilationMapping(SourceConstructFlags.ObjectType)] | |
[Serializable] | |
public class Foo<T> | |
{ | |
internal T value; | |
public T Value | |
{ | |
get | |
{ | |
return this.value; | |
} | |
} | |
public Foo(Bar bar, T value) : this() | |
{ | |
this.value = value; | |
} | |
} | |
[CompilationMapping(SourceConstructFlags.ObjectType)] | |
[Serializable] | |
public class Bar | |
{ | |
internal FSharpRef<Bar> self = new FSharpRef<Bar>(null); | |
internal int init@6; | |
public Bar() : this() | |
{ | |
this.self.contents = this; | |
this.init@6 = 1; | |
} | |
public Foo<T> Create<T>(T x) | |
{ | |
if (this.init@6 < 1) | |
{ | |
LanguagePrimitives.IntrinsicFunctions.FailInit(); | |
} | |
return this.create<T>(x); | |
} | |
[CompilerGenerated] | |
internal Foo<T> create<T>(T x) | |
{ | |
PrintfFormat<FSharpFunc<Type, Unit>, TextWriter, Unit, Unit> format = new PrintfFormat<FSharpFunc<Type, Unit>, TextWriter, Unit, Unit, Type>("%O"); | |
PrintfModule.PrintFormatLineToTextWriter<FSharpFunc<Type, Unit>>(Console.Out, format).Invoke(typeof(object)); | |
return new Foo<object>(LanguagePrimitives.IntrinsicFunctions.CheckThis<Bar>(this.self.contents), x); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment