You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Nested module attribute is not resolved in recursive namespace #7931
Verified still present in F# 10.0 (F# Interactive 14.0.105.0, commit 251aaf2, 2026-03-26).
Minimal reproduction showing the difference between namespace and namespace rec:
// Without rec - compiles fine ✅namespaceNsopenSystem.Runtime.CompilerServices[(Extension)]moduleModule =[(Extension)]letext1(x:int)= x.ToString()
// With rec - FS0039 error ❌namespacerecNsopenSystem.Runtime.CompilerServices[(Extension)]// error FS0039: The type 'Extension' is not defined.moduleModule =[(Extension)]letext1(x:int)= x.ToString()
Error: FS0039: The type 'Extension' is not defined
The open System.Runtime.CompilerServices is in scope (as the non-recursive version proves), but attribute resolution in namespace rec doesn't see types from the opened namespace.
Activity
dsyme commentedon Aug 31, 2020
Linking to issue #5795 since it's a similar underlying problem
dsyme commentedon Apr 4, 2022
Just to note this is another case of attribute checking going awry in recursive scopes.
github-actions commentedon Mar 26, 2026
🤖 This is an automated response from Repo Assist.
Verified still present in F# 10.0 (F# Interactive 14.0.105.0, commit
251aaf2, 2026-03-26).Minimal reproduction showing the difference between
namespaceandnamespace rec:Error:
FS0039: The type 'Extension' is not definedThe
open System.Runtime.CompilerServicesis in scope (as the non-recursive version proves), but attribute resolution innamespace recdoesn't see types from the opened namespace.2 remaining items
Fix #7931: Resolve opened namespaces for attributes in recursive scopes
Add release notes for #7931 fix
Fix #7931: Resolve opened namespaces for attributes in recursive scopes
Add release notes for #7931 fix
Fix #7931: Resolve opened namespaces for attributes in recursive scopes
Add release notes for #7931 fix
Fix #7931: Resolve opened namespaces for attributes in recursive scopes
Add release notes for #7931 fix
Fix #7931: Resolve opened namespaces for attributes in recursive scopes
Add release notes for #7931 fix
Fix #7931: Resolve opened namespaces for attributes in recursive scopes
Add release notes for #7931 fix
Fix dotnet#7931: Resolve opened namespaces for attributes in recursiv…