Skip to content

Commit d4ed513

Browse files
committed
temp
1 parent f788c87 commit d4ed513

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs

+4-6
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,10 @@ module Pass1_DetermineTLRAndArities =
194194
let nFormals = vss.Length
195195
let nMaxApplied = GetMaxNumArgsAtUses xinfo f
196196
let arity = Operators.min nFormals nMaxApplied
197-
if atTopLevel then
198-
Some (f, arity)
199-
else if arity<>0 || not (isNil tps) then
200-
Some (f, arity)
201-
else
202-
None
197+
if atTopLevel then Some (f, arity)
198+
elif g.realsig && arity > 0 then None // This needs some investigation I sorta understand but would have a hard time explaining it
199+
elif arity<>0 || not (isNil tps) then Some (f, arity)
200+
else None
203201

204202
/// Check if f involves any value recursion (so can skip those).
205203
/// ValRec considered: recursive && some f in mutual binding is not bound to a lambda

0 commit comments

Comments
 (0)