(n: Node, ref: UnresolvedRef, context: ResolutionContext)
| 1864 | * Not judged when no type is around the name. |
| 1865 | */ |
| 1866 | export function isVbNestedTypeInScope(n: Node, ref: UnresolvedRef, context: ResolutionContext): boolean { |
| 1867 | if (n.language !== 'vbnet' || !VB_TYPE_LIKE_KINDS.has(n.kind)) return true; |
| 1868 | const parent = enclosingType(n, context); |
| 1869 | if (!parent) return true; |
| 1870 | const owners = scopeOwners(ref, context); |
| 1871 | if (owners === null || owners.has(parent.name.toLowerCase())) return true; |
| 1872 | const alias = importAliases(ref.filePath, context).get(ref.referenceName.toLowerCase()); |
| 1873 | if (alias && alias.name.toLowerCase() === n.name.toLowerCase() && |
| 1874 | (!alias.qualifier || endsWith(fullSegments(n, context).slice(0, -1), alias.qualifier))) return true; |
| 1875 | return importedNames(ref.filePath, context).has(parent.name.toLowerCase()); |
| 1876 | } |
| 1877 | |
| 1878 | /** |
| 1879 | * Whether a receiver-less VB.NET call (or one through `Me` / `MyClass` / |
nothing calls this directly
no test coverage detected