@@ -10227,15 +10227,15 @@ and TcNormalizedBinding declKind (cenv:cenv) env tpenv overallTy safeThisValOpt
1022710227 if (not isMutable || isThreadStatic) then
1022810228 errorR(Error(FSComp.SR.tcVolatileFieldsMustBeMutable(),mBinding))
1022910229
10230- if isFixed then
10231- if declKind <> ExpressionBinding || isInline || isMutable then
10232- errorR(Error(FSComp.SR.tcFixedNotAllowed(),mBinding))
10230+ if isFixed && (declKind <> ExpressionBinding || isInline || isMutable) then
10231+ errorR(Error(FSComp.SR.tcFixedNotAllowed(),mBinding))
1023310232
10234- if HasFSharpAttributeOpt cenv.g cenv.g.attrib_DllImportAttribute valAttribs then
10235- if not declKind.CanBeDllImport || (match memberFlagsOpt with Some memberFlags -> memberFlags.IsInstance | _ -> false) then
10236- errorR(Error(FSComp.SR.tcDllImportNotAllowed(),mBinding))
10233+ if (not declKind.CanBeDllImport || (match memberFlagsOpt with Some memberFlags -> memberFlags.IsInstance | _ -> false)) &&
10234+ HasFSharpAttributeOpt cenv.g cenv.g.attrib_DllImportAttribute valAttribs
10235+ then
10236+ errorR(Error(FSComp.SR.tcDllImportNotAllowed(),mBinding))
1023710237
10238- if HasFSharpAttribute cenv.g cenv.g.attrib_ConditionalAttribute valAttribs && Option.isNone memberFlagsOpt then
10238+ ifOption.isNone memberFlagsOpt && HasFSharpAttribute cenv.g cenv.g.attrib_ConditionalAttribute valAttribs then
1023910239 errorR(Error(FSComp.SR.tcConditionalAttributeRequiresMembers(),mBinding))
1024010240
1024110241 if HasFSharpAttribute cenv.g cenv.g.attrib_EntryPointAttribute valAttribs then