Whether a unit's routine is one a file sees: its own unit's, or one a unit it uses declares in its interface.
(routine: Node, fromFile: string, context: ResolutionContext)
| 391 | |
| 392 | /** Whether a unit's routine is one a file sees: its own unit's, or one a unit it uses declares in its interface. */ |
| 393 | function unitRoutineInScope(routine: Node, fromFile: string, context: ResolutionContext): boolean { |
| 394 | const unit = unitFilesOf(routine.filePath, context)[0]!; |
| 395 | if (ownUnitFiles(fromFile, context).includes(unit) || ownUnitFiles(fromFile, context).includes(routine.filePath)) return true; |
| 396 | return usedUnitFiles(fromFile, context).includes(unit) && exportedRoutine(routine, context); |
| 397 | } |
| 398 | |
| 399 | /** Whether a call's argument count fits a routine's parameters; true when either can't be read. */ |
| 400 | function fitsArguments(routine: Node, ref: UnresolvedRef, context: ResolutionContext): boolean { |
no test coverage detected