sub members (properties/methods) of variables appear different behind an array reference
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- powershell
- Domaine
- tooling
Piste de recherche
Reproduce the three PowerShell expressions in VS Code and use the mentioned Inspect TM Scopes command to compare their scopes. Trace the syntax-highlighting grammar or entry point that handles property access through array references and parenthesized expressions. Done means all equivalent property accesses receive the intended property scope rather than the default unscoped color.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Environment
- Editor and Version: VS Code: 1.25.1
- Your primary theme: Dark+ (with corrections for punctuation inside subexpressions inside strings)
Issue Description
Shouldn't both of these appear equivalent? These are all just accessing a property of an object.
$dir.Extension
$dir[0].Extension
($dir).Extension
obviously there could be a complete expression inside the brackets.

(image doesn't contain the third example line)
Expected Behavior
I would have expected the properties to both be shown in the same dull yellow, but only the first one is, the others are instead white, the default when no scope match occurs.
Using VS Code's Inspect TM Scopes, the first line, results in 'entity.name.function.invocation.powershell' and 'source.powershell', where as the second only has 'source.powershell'.
Fortunately ${dir}.Extension appears correct, but brings up a different issue.
- Langage dominant
- PowerShell
- Étoiles
- 151
- Forks
- 55
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PowerShell/EditorSyntax
-
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
PowerShell/EditorSyntax#224 · 2 commentaires ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
PowerShell/EditorSyntax#222 · 2 commentaires ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
PowerShell/EditorSyntax#221 · 2 commentaires ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
PowerShell/EditorSyntax#220 · 2 commentaires · 1 réaction ·
-
Issue-Bug
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
PowerShell/EditorSyntax#219 · 2 commentaires ·
Toutes les issues de PowerShell/EditorSyntax
Issues similaires
-
스택 PR 머지 시 하위 PR base 재지정 단계 부재 Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
idean3885/claude-ops-agent#521 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
0xMiden/bridge-portal#132 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
newrelic-experimental/preflight#793 · 1 commentaire ·
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
babalae/bettergi-scripts-list#3674 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
caddyserver/caddy#8046 ·