File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -2224,18 +2224,21 @@ module GeneralizationHelpers =
22242224//-------------------------------------------------------------------------
22252225
22262226let ComputeInlineFlag (memFlagsOption: SynMemberFlags option) isInline isMutable g attrs m =
2227- let hasNoCompilerInliningAttribute() = HasFSharpAttribute g g.attrib_NoCompilerInliningAttribute attrs
2228- let isCtorOrAbstractSlot() =
2227+ let hasNoCompilerInliningAttribute () = HasFSharpAttribute g g.attrib_NoCompilerInliningAttribute attrs
2228+
2229+ let isCtorOrAbstractSlot () =
22292230 match memFlagsOption with
22302231 | None -> false
22312232 | Some x -> (x.MemberKind = SynMemberKind.Constructor) || x.IsDispatchSlot || x.IsOverrideOrExplicitImpl
22322233
2234+ let isExtern () = HasFSharpAttributeOpt g g.attrib_DllImportAttribute attrs
2235+
22332236 let inlineFlag, reportIncorrectInlineKeywordUsage =
22342237 // Mutable values may never be inlined
22352238 // Constructors may never be inlined
22362239 // Calls to virtual/abstract slots may never be inlined
22372240 // Values marked with NoCompilerInliningAttribute or [<MethodImpl(MethodImplOptions.NoInlining)>] may never be inlined
2238- if isMutable || isCtorOrAbstractSlot() || hasNoCompilerInliningAttribute() then
2241+ if isMutable || isCtorOrAbstractSlot() || hasNoCompilerInliningAttribute() || isExtern () then
22392242 ValInline.Never, errorR
22402243 elif HasMethodImplNoInliningAttribute g attrs then
22412244 ValInline.Never,
Original file line number Diff line number Diff line change 4040 </NoneSubstituteText >
4141 </ItemGroup >
4242
43+ <ItemGroup Condition =" '$(FSHARPCORE_USE_PACKAGE)' != 'true'" >
44+ <ProjectReference Include =" $(FSharpSourcesRoot)\FSharp.Core\FSharp.Core.fsproj" />
45+ </ItemGroup >
46+
47+ <ItemGroup Condition =" '$(FSHARPCORE_USE_PACKAGE)' == 'true'" >
48+ <PackageReference Include =" FSharp.Core" Version =" $(FSharpCoreShippedPackageVersionValue)" />
49+ </ItemGroup >
50+
4351 <ItemGroup >
44- <ProjectReference Include =" $(MSBuildThisFileDirectory)../FSharp.Core/FSharp.Core.fsproj" AdditionalProperties =" TargetFramework=netstandard2.0" />
4552 <ProjectReference Include =" $(MSBuildThisFileDirectory)../FSharp.Build/FSharp.Build.fsproj" />
4653 <ProjectReference Include =" $(MSBuildThisFileDirectory)../Compiler/FSharp.Compiler.Service.fsproj" />
4754 <ProjectReference Include =" $(MSBuildThisFileDirectory)../FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Nuget.fsproj" />
Original file line number Diff line number Diff line change 4545 </NoneSubstituteText >
4646 </ItemGroup >
4747
48+ <ItemGroup Condition =" '$(FSHARPCORE_USE_PACKAGE)' != 'true'" >
49+ <ProjectReference Include =" $(FSharpSourcesRoot)\FSharp.Core\FSharp.Core.fsproj" />
50+ </ItemGroup >
51+
52+ <ItemGroup Condition =" '$(FSHARPCORE_USE_PACKAGE)' == 'true'" >
53+ <PackageReference Include =" FSharp.Core" Version =" $(FSharpCoreShippedPackageVersionValue)" />
54+ </ItemGroup >
55+
4856 <ItemGroup >
49- <ProjectReference Include =" $(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" AdditionalProperties =" TargetFramework=netstandard2.0" />
5057 <ProjectReference Include =" $(MSBuildThisFileDirectory)..\Compiler\FSharp.Compiler.Service.fsproj" />
5158 <ProjectReference Include =" $(MSBuildThisFileDirectory)..\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj" />
5259 </ItemGroup >
You can’t perform that action at this time.
0 commit comments