Skip to content

Commit 2ae3e82

Browse files
alfonsogarciacaroncave
authored andcommitted
Disable CheckInlineValueIsComplete for Fable (#10)
1 parent dac00d5 commit 2ae3e82

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

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

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

0 commit comments

Comments
 (0)