MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / isVbNestedTypeInScope

Function isVbNestedTypeInScope

src/resolution/vbnet-receivers.ts:1866–1876  ·  view source on GitHub ↗
(n: Node, ref: UnresolvedRef, context: ResolutionContext)

Source from the content-addressed store, hash-verified

1864 * Not judged when no type is around the name.
1865 */
1866export 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` /

Callers

nothing calls this directly

Calls 8

enclosingTypeFunction · 0.85
scopeOwnersFunction · 0.85
importAliasesFunction · 0.85
endsWithFunction · 0.85
fullSegmentsFunction · 0.85
hasMethod · 0.80
importedNamesFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected