Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS0073: internal error: ImportILTypeRef: unexpected local scope using System.Collections.Immutable #16321

Closed
marklam opened this issue Nov 21, 2023 · 5 comments
Assignees
Labels
Area-Compiler-ImportAndInterop import of .NET DLLs and interop Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Regression
Milestone

Comments

@marklam
Copy link

marklam commented Nov 21, 2023

Calling ImmutableQueue.Dequeue or IImmutableStack.Pop causes internal compiler errors

Repro steps

  1. Clone https://github.com/fsprojects/FSharp.Collections.Immutable
  2. dotnet build

Expected behavior

Compilation succeeds

Actual behavior

FSharp.Collections.Immutable\src\FSharp.Collections.Immutable\stack.fs(33,9): error FS0073: internal error: ImportILTypeRef: unexpected local scope
FSharp.Collections.Immutable\src\FSharp.Collections.Immutable\stack.fs(42,33): error FS0073: internal error: ImportILTypeRef: unexpected local scope
FSharp.Collections.Immutable\src\FSharp.Collections.Immutable\queue.fs(28,47): error FS0073: internal error: ImportILTypeRef: unexpected local scope

Known workarounds

As per @vzarytovskii 's comment below, Adding <LangVersion>7.0</LangVersion> to a PropertyGroup in the fsproj allows the compilation to succeed.

Related information

  • Operating system : Windows 10
c:\git>dotnet --list-sdks
6.0.417 [C:\Program Files\dotnet\sdk]
8.0.100 [C:\Program Files\dotnet\sdk]
@vzarytovskii
Copy link
Member

builds with 7.0.404, so something recent

@vzarytovskii
Copy link
Member

Also builds with <LangVersion>7.0</LangVersion>, so, something from 8.0 featureset.

@marklam
Copy link
Author

marklam commented Nov 22, 2023

@vzarytovskii: Edited the issue to add that workaround, thanks.

@0101 0101 added Regression Area-Compiler-ImportAndInterop import of .NET DLLs and interop Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. and removed Needs-Triage labels Nov 27, 2023
@auduchinok
Copy link
Member

This may have also been fixed by #16390.

@KevinRansom KevinRansom self-assigned this Dec 9, 2023
@KevinRansom KevinRansom modified the milestones: Backlog, December-2023 Dec 9, 2023
@KevinRansom
Copy link
Member

This is fixed in the shipped SDK 8.0.200.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compiler-ImportAndInterop import of .NET DLLs and interop Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Regression
Projects
Archived in project
Development

No branches or pull requests

5 participants