Skip to content

Commit 4a2f4b2

Browse files
authored
fix fsi on Mono (fsharp#696)
* fix fsi * fix fsi
1 parent 948e2c7 commit 4a2f4b2

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/absil/ilreflect.fs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -616,14 +616,16 @@ let convFieldInit x =
616616
// it isn't we resort to this technique...
617617
let TypeBuilderInstantiationT =
618618
let ty =
619-
Type.GetType("System.Reflection.Emit.TypeBuilderInstantiation")
620619
#if ENABLE_MONO_SUPPORT
621-
let ty =
622-
if runningOnMono && (isNull ty) then
623-
Type.GetType("System.Reflection.MonoGenericClass")
620+
if runningOnMono then
621+
let ty = Type.GetType("System.Reflection.MonoGenericClass")
622+
match ty with
623+
| null -> Type.GetType("System.Reflection.Emit.TypeBuilderInstantiation")
624+
| _ -> ty
624625
else
625-
ty
626626
#endif
627+
Type.GetType("System.Reflection.Emit.TypeBuilderInstantiation")
628+
627629
assert (not (isNull ty))
628630
ty
629631

0 commit comments

Comments
 (0)