You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the assembly reference set for the compilation is incomplete, some
nterfaces to types relevant to compilation may lie in assemblies outside
the assembly reference set. This applies particularly to private ("internals
visible to") interfaces found in .NET assemblies.
This causes very substantial usability bugs in practice as various parts of
type inference and other checking "give up" when you get this condition. The
C# compiler doesn't give up in the same way.
In most cases it is reasonable to simply skip interfaces-that-lie-outside-the-
set-of-referenced-assemblies during F# compilation. Skipping unresolvable
interfaces is pretty much harmless: any substantive analysis on the interface
type (such as implementing it) will require the assembly holding the interface
type.
There are some exceptions: if an interface I1 lies outside the referenceable
set and you try to implement I2 inheriting from I1 then we'd better not skip
I1. Indeed if you even try to find the methods on I2 then we'd better not skip
I1. These are covered by "FoldPrimaryHierarchyOfType" in the code.
fixes#337closes#356
commit dd5205c769828e2e16e736c126cb62d68e7beb87
Author: Don Syme <donsyme@fastmail.fm>
Date: Thu Apr 23 23:53:59 2015 +0100
add test case
commit db28771c75d022247dee6dea60a89b8c29fab4b5
Author: Don Syme <donsyme@fastmail.fm>
Date: Fri Apr 10 12:18:50 2015 +0200
skip unloadable interfaces (2)
commit 18a47124480efdf58a75ce2fa7273c6f7550c1c0
Author: Don Syme <donsyme@fastmail.fm>
Date: Fri Apr 10 11:53:39 2015 +0200
skip unloadable interfaces
if suppressInheritanceAndInterfacesForTyInSimplifiedDisplays g amap m ty then
1420
1420
[]
1421
1421
else
1422
-
GetImmediateInterfacesOfType g amap m ty |> List.map (fun ity -> wordL (if isInterfaceTy g ty then"inherit"else"interface")--- layoutType denv ity)
1422
+
GetImmediateInterfacesOfType SkipUnrefInterfaces.Yes g amap m ty |> List.map (fun ity -> wordL (if isInterfaceTy g ty then"inherit"else"interface")--- layoutType denv ity)
1423
1423
1424
1424
letprops=
1425
1425
GetIntrinsicPropInfosOfType infoReader (None,ad,AllowMultiIntfInstantiations.Yes) PreferOverrides m ty
0 commit comments