Skip to content

Python interpreter gets error, using [int] with a function call while pyrefly doesn't get error #2590

@hyperkai

Description

@hyperkai

Describe the Bug

*Notes:

  • pyrefly check test.py
  • pyrefly 0.46.1
  • Python 3.14.0

Python interpreter gets the error, using [int] with a function call while pyrefly doesn't get error as shown below:

def func[T](x: T) -> T:
    return x
               # python # pyrefly
func[int](100) # Error  # No error

TypeError: 'function' object is not subscriptable

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions