Skip to content

[Feature Request]: Common inlays should work with params #29027

Description

@jabraham17

The following code has a few common type inlays in CLS (comments indicate inlays)

/*Show Generic | Show Instantiation | Show Instantiation */
proc foo(const x, const z/*:string*/)/*: string*/ {
  const y = x;
  const zz/*:string*/ = z + "z";
  return zz;
}
foo(1, "z");
foo(2.0, "z");

This is correct behavior. However, if I change const to param, it no longer works (comments indicate actual inlays)

/*Show Generic | Show Instantiation | Show Instantiation */
proc foo(param x, param z)/*: string*/ {
  param y = x;
  param zz = z + "z";
  return zz;
}
foo(1, "z");
foo(2.0, "z");

The common inlay for the return type is computed correctly, but the decl inlays do not get computed. z and zz are both always string, and so should get inlays. Additionally, I think it would be a great feature to also show the common inlays for param values. In this case, z is always "z" and zz is always "zz", so we could have the param inlays show commonly. If one of the "Show Instantiation"'s is selected, these are shown. But since they never change they can always be shown.

I am filing this as a feature request, not a bug, because I view the common param values as a new feature and the common param types as an unimplemented feature

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions