Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/Compiler/Driver/GraphChecking/FileContentMapping.fs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ let visitSynUnionCase (SynUnionCase (attributes = attributes; caseType = caseTyp
let visitSynEnumCase (SynEnumCase (attributes = attributes)) = visitSynAttributes attributes

let visitSynTypeDefn
(SynTypeDefn (typeInfo = SynComponentInfo (attributes = attributes; typeParams = typeParams; constraints = constraints)
(SynTypeDefn (typeInfo = SynComponentInfo (attributes = attributes; longId = longId; typeParams = typeParams; constraints = constraints)
typeRepr = typeRepr
members = members))
: FileContentEntry list =
Expand Down Expand Up @@ -131,6 +131,9 @@ let visitSynTypeDefn
| SynTypeDefnKind.Delegate (signature, _) ->
yield! visitSynType signature
yield! List.collect visitSynMemberDefn members
| SynTypeDefnKind.Augmentation _ ->
yield! visitLongIdent longId
yield! List.collect visitSynMemberDefn members
| _ -> yield! List.collect visitSynMemberDefn members
| SynTypeDefnRepr.Exception _ ->
// This is only used in the typed tree
Expand All @@ -140,7 +143,10 @@ let visitSynTypeDefn
]

let visitSynTypeDefnSig
(SynTypeDefnSig (typeInfo = SynComponentInfo (attributes = attributes; typeParams = typeParams; constraints = constraints)
(SynTypeDefnSig (typeInfo = SynComponentInfo (attributes = attributes
longId = longId
typeParams = typeParams
constraints = constraints)
typeRepr = typeRepr
members = members))
=
Expand All @@ -159,7 +165,10 @@ let visitSynTypeDefnSig
| SynTypeDefnSimpleRepr.General _
| SynTypeDefnSimpleRepr.LibraryOnlyILAssembly _ -> ()
| SynTypeDefnSimpleRepr.TypeAbbrev (rhsType = rhsType) -> yield! visitSynType rhsType
| SynTypeDefnSimpleRepr.None _
// This is a type augmentation in a signature file
| SynTypeDefnSimpleRepr.None _ ->
yield! visitLongIdent longId
yield! List.collect visitSynMemberSig members
// This is only used in the typed tree
// The parser doesn't construct this
| SynTypeDefnSimpleRepr.Exception _ -> ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -612,4 +612,80 @@ open Foo.Bar.Y // Y.fs
"""
(set [| 1 |])
]
scenario
"Identifier in type augmentation can link files"
[
sourceFile
"PoolingValueTasks.fs"
"""
namespace IcedTasks

module PoolingValueTasks =
type PoolingValueTaskBuilderBase() =
class
end
"""
Set.empty
sourceFile
"ColdTask.fs"
"""
namespace IcedTasks

module ColdTasks =
module AsyncExtensions =
type PoolingValueTasks.PoolingValueTaskBuilderBase with
member this.Source (a:int) = a
"""
(set [| 0 |])
]
scenario
"Identifier in type augmentation in signature file can link files"
[
sourceFile
"PoolingValueTasks.fsi"
"""
namespace IcedTasks

module PoolingValueTasks =
type PoolingValueTaskBuilderBase =
class
new: unit -> PoolingValueTaskBuilderBase
end
"""
Set.empty
sourceFile
"PoolingValueTasks.fs"
"""
namespace IcedTasks

module PoolingValueTasks =
type PoolingValueTaskBuilderBase() =
class
end
"""
(set [| 0 |])
sourceFile
"ColdTask.fsi"
"""
namespace IcedTasks

module ColdTasks =
module AsyncExtensions =
type PoolingValueTasks.PoolingValueTaskBuilderBase with

member Source: a: int -> int
"""
(set [| 0 |])
sourceFile
"ColdTask.fs"
"""
namespace IcedTasks

module ColdTasks =
module AsyncExtensions =
type PoolingValueTasks.PoolingValueTaskBuilderBase with
member this.Source (a:int) = a
"""
(set [| 0; 2 |])
]
]