Skip to content

Assorted find-all-references bugs #13766

Closed
@ghost

Description

I made a list of things I discovered while working on #13760.

  • Some tests don't have isWriteAccess when they should

    • findAllRefsParameterPropertyDeclaration1 (/2, /3): this.privateParam += 10 should be a write access
    • referencesForNumericLiteralPropertyNames: These should be write accesses if normally-named properties are
    • referencesForStringLiteralPropertyNames (/4): Same as above
    • referencesForClassParameter: All should be write accesses
    • localGetReferences (e.g. fooCls.clsSVar++)
    • getOccurrencesIsDefinitionOfComputedProperty: definition should be a write access
    • referenceInParameterPropertyDeclaration
    • remoteGetReferences
  • Some tests have multiple groups with identical definitions.

    • findAllRefsForObjectLiteralProperties
    • findAllRefsOnDefinition: r1
    • findAllRefsWithLeadingUnderscoreNames1 (/2, /3, /4)
    • findAllRefsWithShorthandPropertyAssignment: r4
    • findAllRefsWithShorthandPropertyAssignment2: r3
    • referencesForInheritedProperties: r3
    • referencesForInheritedProperties2: r3
    • referencesForInheritedProperties4: r1
    • referencesForObjectLiteralProperties
    • referencesForPropertiesOfGenericTypes
    • ambientShorthandFindAllRefs
    • getReferencesAtPosition
    • getOccurrencesIsDefinitionOfStringNamedProperty
    • referencesForClassParameter
    • referencesForClassLocal
    • referencesBloomFilters (/2)
    • getOccurrencesIsDefinitionOfNumberNamedProperty
    • cancellationWhenFindingAllRefsOnDefinition
    • referencesForClassMembers: m2
  • Some tests have a different ordering of merged declarations depending on where you start.
    (Maybe this is fine.)

    • findAllRefsForDefaultExport03
    • findAllRefsInheritedProperties1
    • findAllRefsInheritedProperties3 (see r6)
    • referencesBloomFilters (/2)
  • Other

    • findAllRefsForComputedProperties: I[["prop1"]] should be just I["prop1"].
    • findAllRefsForMappedType:
      It's iffy that (property) a: string only shows up when you're directly using it, and otherwise is grouped under (property) T.a: number.
    • findAllRefsObjectBindingElementPropertyName06: r4 could be just one definition
    • findAllRefsObjectBindingElementPropertyName07:
      The first a shouldn't be a write access (or a definition): it's just the property name we're destructuring from. p is the definition.
    • findAllRefsOnImportAliases2: In import Class as C2, Class doesn't really deserve "isDefinition"
    • findAllRefsThisKeyword:
      Wierd that "f0" and "f1" have different definitions. Same for "propDef" and "propUse".
    • findAllRefsForObjectSpread:
      A2.a: number should be A2.a?: number
    • referencesForContextuallyTypedUnionProperties (/2):
      Strange how most of them are considered A.common.
    • referencesForEnums:
      If value1 is a write access, value2 should be too
    • referencesForMergedDeclarations: two of the definitions do not contain "interface Foo", why?
    • renameDefaultImportDifferentName:
      "constructor C(): B" is iffy, since 'C' and 'B' are the same thing
    • getOccurrencesIsDefinitionOfComputedProperty: Should work for r1 and r2
    • referencesForClassMembersExtendingGenericClass:
      Wierd that for m1, it shows as Base<T>.method(): void

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions