Skip to content

Commit 695471c

Browse files
alfonsogarciacaroncave
authored andcommitted
Disable CheckInlineValueIsComplete for Fable (#10)
1 parent 4da8790 commit 695471c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Compiler/Optimize/Optimizer.fs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,10 +484,18 @@ let rec IsPartialExprVal x =
484484
| ValValue (_, a)
485485
| SizeValue(_, a) -> IsPartialExprVal a
486486

487+
#if FABLE_CLI
488+
// Many Fable packages inline functions that access internal values to resolve generics, this is not an issue
489+
// in "normal" Fable compilations but it raises errors when generating an assembly por precompilation. Disable
490+
// for Fable as it's not an actual error (and if is, we assume it's already been raised during type chedking).
491+
let CheckInlineValueIsComplete (_v: Val) _res =
492+
()
493+
#else
487494
let CheckInlineValueIsComplete (v: Val) res =
488495
if v.MustInline && IsPartialExprVal res then
489496
errorR(Error(FSComp.SR.optValueMarkedInlineButIncomplete(v.DisplayName), v.Range))
490497
//System.Diagnostics.Debug.Assert(false, sprintf "Break for incomplete inline value %s" v.DisplayName)
498+
#endif
491499

492500
let check (vref: ValRef) (res: ValInfo) =
493501
CheckInlineValueIsComplete vref.Deref res.ValExprInfo

0 commit comments

Comments
 (0)