From 67bd819e50bb8deeef49ab3ae08612de69450ad9 Mon Sep 17 00:00:00 2001 From: jindraivanek Date: Fri, 24 Mar 2017 21:49:09 +0100 Subject: [PATCH] Check before ILTypeInfo.FromType --- src/fsharp/vs/ServiceDeclarations.fs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fsharp/vs/ServiceDeclarations.fs b/src/fsharp/vs/ServiceDeclarations.fs index c09d8621f0..b1cac845f6 100644 --- a/src/fsharp/vs/ServiceDeclarations.fs +++ b/src/fsharp/vs/ServiceDeclarations.fs @@ -286,8 +286,11 @@ module internal ItemDescriptionsImpl = // Generalize to get a formal signature let formalTypars = tcref.Typars(m) let formalTypeInst = generalizeTypars formalTypars - let formalTypeInfo = ILTypeInfo.FromType g (TType_app(tcref,formalTypeInst)) - Some(nlref.Ccu.FileName,formalTypars,formalTypeInfo) + let ty = TType_app(tcref,formalTypeInst) + if isILAppTy g ty then + let formalTypeInfo = ILTypeInfo.FromType g ty + Some(nlref.Ccu.FileName,formalTypars,formalTypeInfo) + else None let mkXmlComment thing = match thing with