Skip to content

Segmentation fault with recursive type #17236

@RbCaVi

Description

@RbCaVi

Crash Report

Compiled mypy has a segmentation fault.

Traceback

(Too many lines to copy)

To Reproduce

import typing

T1 = typing.NewType('T1',str)
T2 = tuple[T1,'T4','T4']
T3 = tuple[str,'T4','T4']
T4 = T2 | T3

Your Environment

  • Mypy version used: master (mypy 1.11.0+dev.35fbd2a852be2c47e8006429afe9b3ad4b1bfac2 (compiled: no))
  • Mypy command-line flags: mypy test.py --show-traceback
  • Mypy configuration options from mypy.ini (and other config files): No config files
  • Python version used: 3.12 (compiled from source)
  • Operating system and version: CentOS 7

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions