Skip to content

Commit 819f33d

Browse files
committed
Remove error/union recovery
1 parent 029723f commit 819f33d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Compiler/Checking/NameResolution.fs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2483,11 +2483,7 @@ let private ResolveObjectConstructorPrim (ncenv: NameResolver) edenv resInfo m a
24832483
[DefaultStructCtor(g, ty)]
24842484
else []
24852485
if (isNil defaultStructCtorInfo && isNil ctorInfos) || (not (isAppTy g ty) && not (isAnyTupleTy g ty)) then
2486-
let nm = NicePrint.minimalStringOfType edenv ty
2487-
if isRecdTy g ty || isUnionTy g ty then
2488-
success (resInfo, Item.Types(nm, [ty]))
2489-
else
2490-
raze (Error(FSComp.SR.nrNoConstructorsAvailableForType(nm), m))
2486+
raze (Error(FSComp.SR.nrNoConstructorsAvailableForType(NicePrint.minimalStringOfType edenv ty), m))
24912487
else
24922488
let ctorInfos = ctorInfos |> List.filter (IsMethInfoAccessible amap m ad)
24932489
let metadataTy = convertToTypeWithMetadataIfPossible g ty

0 commit comments

Comments
 (0)