Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Class instance variables should not appear as members of class type #1233

Open

Description

image

Foo does not have that member, Foo() does.

Activity

  1. MikhailArkhipov commented on Jun 20, 2019

    @MikhailArkhipov

    They are part of the type definition, so I guess should be filtered out by completion based on the class/static attributes.

  2. jakebailey commented on Jun 20, 2019

    @jakebailey
    MemberAuthor

    It's not a completion thing, it's earlier during the analysis.

    image

    Note how x has int; it's not that we're listing the wrong members, that member shouldn't be on the type at all, just the instance.

  3. MikhailArkhipov commented on Jun 20, 2019

    @MikhailArkhipov

    Except our instances don't have ability to have members. Like in .NET types, all members are on the type but differ by binding flags. https://docs.microsoft.com/en-us/dotnet/api/system.type.getmethods?view=netframework-4.8#System_Type_GetMethods_System_Reflection_BindingFlags_

  4. MikhailArkhipov commented on Jun 20, 2019

    @MikhailArkhipov

    Functions have IsClassMethod and IsStatic, IsOverload. I think we may want to switch to flags, perhaps unify some with properties and then filter at completion time.

  5. jakebailey commented on Jun 21, 2019

    @jakebailey
    MemberAuthor

    My only worry is that by doing filtering at completion time, we have to duplicate that code for member accesses in other places. We can filter the completion, but any code that (incorrectly) accesses that will be treated as valid. Maybe all members need those flags, not just functions/properties.

  6. MikhailArkhipov commented on Jun 21, 2019

    @MikhailArkhipov

    Yes, it may be the case. i.e. changing signature of GetMemberNames to include binding flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions