Skip to content

segmentation fault on indexing object with __getattr__ #6579

@programmerjake

Description

@programmerjake

Please provide more information to help us understand the issue:

  • Are you reporting a bug, or opening a feature request?
    Bug.
  • Please insert below the code you are checking with mypy,
    or a mock-up repro if the source is private. We would appreciate
    if you try to simplify your case to a minimal repro.
class C:
    def __getattr__(self, name: str) -> 'C':
        ...


def f(v: C) -> None:
    v[0]
  • What is the actual behavior/output?
    segfault

  • What is the behavior/output you expect?
    not crashing

  • What are the versions of mypy and Python you are using?
    python 3.6.7 on Ubuntu 18.04.2 x86_64
    mypy 0.670 installed march 20 2019 via pip

    Do you see the same issue after installing mypy from Git master?
    yes
    0.680+dev.4e0a1583aeb00b248e187054980771f1897a1d31

  • What are the mypy flags you are using? (For example --strict-optional)
    none

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy