New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go to Definition does not work with double-sigil deref in Perl #1514

Closed
shawnlaffan opened this Issue May 18, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@shawnlaffan

shawnlaffan commented May 18, 2016

Short Summary

Go to Definition does not move the cursor when a perl reference is used in a double sigil deref.

Reproduced in both 9.3 and 10.0

Steps to Reproduce

Load the code below into Komodo.

my $hashref = {};
my %y = %$hashref;
my %z = %{$hashref};
  1. Locate the cursor on the second line (%z assignment) and then run Go to Definition on $hashref in that line. The cursor moves to the first line.
  2. Locate the cursor on the second line (%y assignment) and then run Go to Definition on $hashref in that line. The cursor does not move.

The same occurs for array and scalar refs. e.g.

my $arrayref = [];
my @a2 = @$arrayref;
my @a1 = @{$arrayref};

my $scalar = '';
my $s1 = $$scalar;
my $s2 = ${$scalar};

Expected results

Cursor should move to the variable definition in all cases.

Actual results

See above.

Platform Information

Komodo Edit or IDE? IDE
Komodo Version? 9.3.2 and 10.0
Operating System (and version)? Windows 10

@mitchell-as mitchell-as added this to the 10.1 milestone May 18, 2016

@mitchell-as mitchell-as self-assigned this May 18, 2016

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented May 18, 2016

Thanks for the report!

@shawnlaffan

This comment has been minimized.

shawnlaffan commented May 18, 2016

No worries.

Ref generation is also affected:

my @array;
my $aref1 = \ @array;  #  works
my $aref2 = \@array;   #  does not work
my $aref3 = [@array];  #  works

my %hash;
my $href1 = \ %hash;   # works
my $href2 = \%hash;    # does not work
my %href3 = {%hash};   # works

my $sc = '';
my $sref1 = \ $sc;  #  works
my $sref2 = \$sc;   #  does not work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment