Skip to content

Constructor field parameters use incorrect symbol format #21

@matthewnitschke-wk

Description

@matthewnitschke-wk
class Foo {
  final String bar;
//             ^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/Foo#bar.
  const Foo._({required this.bar});
//                           ^^^ reference scip-dart pub dart_test 1.0.0 lib/main.dart/Foo#bar.

  static const someVal = Foo._(bar: "somestring");
//                             ^^^ reference scip-dart pub dart_test 1.0.0 lib/main.dart/Foo#_().(bar)
}

Scip analysis treats named parameters always as a "parameter" index: Foo#_().(bar), even when this is referencing a field. We need to update the symbol logic to check whether the element is referring to a field parameter, and if so, generate correctly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions