diff --git a/gitnexus/src/core/ingestion/type-extractors/r.ts b/gitnexus/src/core/ingestion/type-extractors/r.ts index b1a815f22..f5e159b8c 100644 --- a/gitnexus/src/core/ingestion/type-extractors/r.ts +++ b/gitnexus/src/core/ingestion/type-extractors/r.ts @@ -7,6 +7,7 @@ import type { } from './types.js'; import type { SyntaxNode } from '../utils/ast-helpers.js'; import { getRClassNameArgument } from '../field-extractors/r.js'; +import { rBareName } from '../languages/r/bare-name.js'; /** * R type extractor — roxygen2 annotation parsing. @@ -205,7 +206,8 @@ const extractParameter: ParameterExtractor = (node: SyntaxNode, env: Map { + const tree = parse(` +DataFrame <- R6::R6Class("DataFrame", public = list(rows = function() 1)) + +#' @param data DataFrame +Summarise <- function(\`data\`) { + \`data\`$rows() +} +`); + const typeEnv = buildTypeEnv(tree, SupportedLanguages.R); + expect(flatGet(typeEnv, '`data`')).toBe('DataFrame'); + }); + it('binds nothing for a type the file does not define (primitive or capitalised)', () => { const tree = parse(` #' @param x numeric