SourceFile object can be shared between multiple Program instances. wasReferenced is dependent on how the other SourceFile objects in the context. the result is a sourceFile object shared between two Program instances, say in the language service, would not be treated correctly.
We should add the list of "referenced" source files to the program, and have Program.isSourceFileReferenced(sourceFile) as a function instead of a property.
SourceFile object can be shared between multiple Program instances.
wasReferencedis dependent on how the otherSourceFileobjects in the context. the result is a sourceFile object shared between two Program instances, say in the language service, would not be treated correctly.We should add the list of "referenced" source files to the program, and have
Program.isSourceFileReferenced(sourceFile)as a function instead of a property.