Whether the resolved target is a member of the class a C++ template parameter defaults to (`= TcParser`, `= std::allocator `).
(result: ResolvedRef, fallback: string | undefined, context: ResolutionContext)
| 98 | |
| 99 | /** Whether the resolved target is a member of the class a C++ template parameter defaults to (`= TcParser`, `= std::allocator<T>`). */ |
| 100 | function isMemberOfDefault(result: ResolvedRef, fallback: string | undefined, context: ResolutionContext): boolean { |
| 101 | const type = fallback === undefined ? undefined : /([A-Za-z_]\w*)\s*(?:<[\s\S]*>)?\s*$/.exec(fallback)?.[1]; |
| 102 | if (!type) return false; |
| 103 | const segments = context.getNodeById?.(result.targetNodeId)?.qualifiedName.split('::') ?? []; |
| 104 | return segments.length >= 2 && segments[segments.length - 2] === type; |
| 105 | } |
| 106 | |
| 107 | const SCALA_OWNER_KINDS: ReadonlySet<string> = new Set(['class', 'trait', 'module', 'interface', 'struct', 'enum']); |
| 108 | const SCALA_TYPE_KINDS: ReadonlySet<string> = new Set(['class', 'trait', 'interface', 'struct', 'enum', 'type_alias']); |
no test coverage detected