Skip to content
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

references not found when used in class #876

Closed
mwallner opened this issue Jun 14, 2017 · 3 comments
Closed

references not found when used in class #876

mwallner opened this issue Jun 14, 2017 · 3 comments
Labels
Area-Symbols & References Issue-Bug A bug to squash. Resolution-Duplicate Will close automatically.

Comments

@mwallner
Copy link

System Details

  • Operating system name and version: Windows 7 Enterprise SP1
  • VS Code version: 1.13.0
  • PowerShell extension version: 1.3.2
  • Output from $PSVersionTable:
PS E:\> code -v
1.13.0
376c52b955428d205459bea6619fc161fc8faacf
PS E:\> $pseditor.EditorServicesVersion
PS E:\> code --list-extensions --show-versions
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
PS E:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.0.10586.117
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.10586.117
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

references not found when used in class

As visible in the following screenshot, there is "1 reference" found for the function Get-ResultStateBGClass - this one usage is also visiable right below in the function Get-ResultStateAlertBGClass:
image

But, in the same file, some lines down there's a class which also uses the function Get-ResultStateBGClass within a function:
image

(so there should be two references for Get-ResultStateBGClass...)

This is reproducable with this very easy setup:

function Get-Foo {
  return "foo"
}

class Bar {
  [string] BarGetFoo {
	  $var = Get-Foo 
  }
}
@JustinGrote
Copy link
Collaborator

Slightly modified example to proper code but this issue is still valid

function Get-Foo {
    return "foo"
}
class Bar {
    [string] BarGetFoo() {
        return Get-Foo #This does not get properly referenced to the definition
    }
}

Get-Foo #This does

image

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Apr 22, 2020
@TylerLeonhardt
Copy link
Member

This is a duplicate of #3 once we add proper support for classes (eventually.........) this should be resolved.

@TylerLeonhardt TylerLeonhardt added Resolution-Duplicate Will close automatically. and removed Needs: Maintainer Attention Maintainer attention needed! labels Apr 22, 2020
@ghost
Copy link

ghost commented Apr 23, 2020

This issue has been marked as duplicate and has not had any activity for 1 day. It has been closed for housekeeping purposes.

@ghost ghost closed this as completed Apr 23, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Symbols & References Issue-Bug A bug to squash. Resolution-Duplicate Will close automatically.
Projects
None yet
Development

No branches or pull requests

4 participants