Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(🐞) Silent crash regression in 1.2 with complex Concatenate return value #15073

Closed
KotlinIsland opened this issue Apr 18, 2023 · 1 comment · Fixed by #15272
Closed

(🐞) Silent crash regression in 1.2 with complex Concatenate return value #15073

KotlinIsland opened this issue Apr 18, 2023 · 1 comment · Fixed by #15272
Labels
crash topic-paramspec PEP 612, ParamSpec, Concatenate

Comments

@KotlinIsland
Copy link
Contributor

KotlinIsland commented Apr 18, 2023

Crash Report

Absolutely nothing.

Traceback

N/A

To Reproduce

from typing import TypeVar, Callable, Concatenate, ParamSpec

R = TypeVar("R")
P = ParamSpec("P")

def f(
) -> Callable[[Callable[Concatenate[Callable[P, R], P], R]], Callable[P, R]]:
    def r(fn: Callable[Concatenate[Callable[P, R], P], R]) -> Callable[P, R]:
        pass
    return r

playground

Your Environment

  • Mypy version used: 1.2.0
  • Mypy command-line flags: None
  • Mypy configuration options from mypy.ini (and other config files): None
  • Python version used: 3.11.3
  • Operating system and version: Windows version 10

Why?

This is because of an infinite recursion in mypy.expandtype.ExpandTypeVisitor.visit_callable_type.

@KotlinIsland KotlinIsland changed the title (🐞) Silent crash regression in 1.2 with complex Concatenat return value (🐞) Silent crash regression in 1.2 with complex Concatenate return value Apr 18, 2023
@JelleZijlstra JelleZijlstra added the topic-paramspec PEP 612, ParamSpec, Concatenate label Apr 18, 2023
@ilevkivskyi
Copy link
Member

This crash is caused by #14677. @A5rocks please take a look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash topic-paramspec PEP 612, ParamSpec, Concatenate
Projects
None yet
3 participants