Skip to content

Set-Strictmode should not complain about COUNT & LENGTH properties on elements #2798

@jpsnover

Description

@jpsnover

One of the big problems we have had in the language has been not knowing whether the following expression was going to return a single element or an array:

$x = gps $name

We fixed this longstanding problem by masking over the issue allowing elements to be treated as arrays. e.g.

(gps -id 0).count
(gps -id 0).length

When you enable strictmode - it complains about these and it shouldn't.
I'm about to enable strictmode on a large collection of scripts and I'm sure that is going to find lots of these issue and modifying the code is not going to make the code any better - it will just cause a lot of work and reduce my reliability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifKeepOpenThe bot will ignore these and not auto-closeWG-Languageparser, language semanticsWG-NeedsReviewNeeds a review by the labeled Working Group

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions