Skip to content

Commit

Permalink
QuickHack around dotnet#95
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Jan 25, 2015
1 parent 11ede75 commit 3d3c5a9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/fsharp/nameres.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1650,10 +1650,12 @@ let rec ResolveExprLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv (typeN
success(resInfo,Item.Value (mkNestedValRef modref vspec),rest)
| _->
match TryFindTypeWithUnionCase modref id with
| Some tycon when IsTyconReprAccessible ncenv.amap m ad (modref.MkNestedTyconRef tycon) ->
let ucref = mkUnionCaseRef (modref.MkNestedTyconRef tycon) id.idText
let ucinfo = FreshenUnionCaseRef ncenv m ucref
success (resInfo,Item.UnionCase ucinfo,rest)
| Some tycon when IsTyconReprAccessible ncenv.amap m ad (modref.MkNestedTyconRef tycon) &&
tycon.Attribs.IsEmpty // this is incorrect - we want to exclude RequireQualifiedAccess instead
->
let ucref = mkUnionCaseRef (modref.MkNestedTyconRef tycon) id.idText
let ucinfo = FreshenUnionCaseRef ncenv m ucref
success (resInfo,Item.UnionCase ucinfo,rest)
| _ ->
match mty.ExceptionDefinitionsByDemangledName.TryFind(id.idText) with
| Some excon when IsTyconReprAccessible ncenv.amap m ad (modref.MkNestedTyconRef excon) ->
Expand Down

0 comments on commit 3d3c5a9

Please sign in to comment.