Skip to content

Commit 48dfdad

Browse files
committed
Minimize diff
1 parent dbee759 commit 48dfdad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Compiler/Checking/CheckDeclarations.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4269,11 +4269,8 @@ module TcDeclarations =
42694269
declaredTypars |> List.iter (SetTyparRigid envForDecls.DisplayEnv m)
42704270

42714271
if tcref.TypeAbbrev.IsSome then
4272-
errorR (Error(FSComp.SR.tcTypeAbbreviationsCannotHaveAugmentations(), m))
42734272
ExtrinsicExtensionBinding, tcref, declaredTypars
4274-
else
4275-
4276-
if isInSameModuleOrNamespace && not isInterfaceOrDelegateOrEnum then
4273+
elif isInSameModuleOrNamespace && not isInterfaceOrDelegateOrEnum then
42774274
// For historical reasons we only give a warning for incorrect type parameters on intrinsic extensions
42784275
if nReqTypars <> synTypars.Length then
42794276
errorR(Error(FSComp.SR.tcDeclaredTypeParametersForExtensionDoNotMatchOriginal(tcref.DisplayNameWithStaticParametersAndUnderscoreTypars), m))
@@ -4608,6 +4605,9 @@ module TcDeclarations =
46084605
if (declKind = ExtrinsicExtensionBinding) && isByrefTyconRef g tcref then
46094606
error(Error(FSComp.SR.tcByrefsMayNotHaveTypeExtensions(), tyDeclRange))
46104607

4608+
if not (isNil members) && tcref.IsTypeAbbrev then
4609+
errorR(Error(FSComp.SR.tcTypeAbbreviationsCannotHaveAugmentations(), tyDeclRange))
4610+
46114611
let (SynComponentInfo (attributes, _, _, _, _, _, _, _)) = synTyconInfo
46124612
if not (List.isEmpty attributes) && (declKind = ExtrinsicExtensionBinding || declKind = IntrinsicExtensionBinding) then
46134613
let attributeRange = (List.head attributes).Range

0 commit comments

Comments
 (0)