Skip to content

Commit d6e04c7

Browse files
committed
Fable parsing fix
1 parent b6ab51f commit d6e04c7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/fsharp/IlxGen.fs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ let ReportStatistics (oc:TextWriter) = reports oc
124124

125125
let NewCounter nm =
126126
let count = ref 0
127+
#if FABLE_COMPILER
128+
ignore nm
129+
#else
127130
AddReport (fun oc -> if !count <> 0 then oc.WriteLine (string !count + " " + nm))
131+
#endif
128132
(fun () -> incr count)
129133

130134
let CountClosure = NewCounter "closures"
@@ -7014,6 +7018,8 @@ type ExecutionContext =
70147018
LookupTypeRef : (ILTypeRef -> Type)
70157019
LookupType : (ILType -> Type) }
70167020

7021+
#if !FABLE_COMPILER
7022+
70177023
// A helper to generate a default value for any System.Type. I couldn't find a System.Reflection
70187024
// method to do this.
70197025
let defaultOf =
@@ -7024,8 +7030,6 @@ let defaultOf =
70247030
| _ -> failwith "unexpected failure decoding quotation at ilxgen startup")
70257031
fun ty -> gminfo.Value.MakeGenericMethod([| ty |]).Invoke(null,[| |])
70267032

7027-
#if !FABLE_COMPILER
7028-
70297033
/// Top-level val bindings are stored (for example) in static fields.
70307034
/// In the FSI case, these fields are be created and initialised, so we can recover the object.
70317035
/// IlxGen knows how v was stored, and then ilreflect knows how this storage was generated.

0 commit comments

Comments
 (0)