Skip to content

Commit a151781

Browse files
alfonsogarciacaroncave
authored andcommitted
Disable CheckInlineValueIsComplete for Fable (#10)
1 parent 6406919 commit a151781

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
@@ -499,10 +499,18 @@ let rec IsPartialExprVal x =
499499
| ValValue (_, a)
500500
| SizeValue (_, a) -> IsPartialExprVal a
501501

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

507515
let check (vref: ValRef) (res: ValInfo) =
508516
CheckInlineValueIsComplete vref.Deref res.ValExprInfo

0 commit comments

Comments
 (0)