Skip to content

Commit 6876e82

Browse files
alfonsogarciacaroncave
authored andcommitted
Disable CheckInlineValueIsComplete for Fable (#10)
1 parent c8b4cef commit 6876e82

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
@@ -495,10 +495,18 @@ let rec IsPartialExprVal x =
495495
| ValValue (_, a)
496496
| SizeValue(_, a) -> IsPartialExprVal a
497497

498+
#if FABLE_CLI
499+
// Many Fable packages inline functions that access internal values to resolve generics, this is not an issue
500+
// in "normal" Fable compilations but it raises errors when generating an assembly por precompilation. Disable
501+
// for Fable as it's not an actual error (and if is, we assume it's already been raised during type chedking).
502+
let CheckInlineValueIsComplete (_v: Val) _res =
503+
()
504+
#else
498505
let CheckInlineValueIsComplete (v: Val) res =
499506
if v.MustInline && IsPartialExprVal res then
500507
errorR(Error(FSComp.SR.optValueMarkedInlineButIncomplete(v.DisplayName), v.Range))
501508
//System.Diagnostics.Debug.Assert(false, sprintf "Break for incomplete inline value %s" v.DisplayName)
509+
#endif
502510

503511
let check (vref: ValRef) (res: ValInfo) =
504512
CheckInlineValueIsComplete vref.Deref res.ValExprInfo

0 commit comments

Comments
 (0)