void () { doTestByText(""" from typing import TypeVarTuple from typing import TypeVar from typing import Generic from typing import NewType Shape = TypeVarTuple("Shape") Height = NewType("Height", int) Width = NewType("Width", int) DType = TypeVar("DType") class Array(Generic[DType, *Shape]): ... Float32Array = Array[float, *Shape] def takes_float_array_of_specific_shape(arr: Float32Array[Height]): ... y: Float32Array[Height, Width] = Array() takes_float_array_of_specific_shape(<warning descr="Expected type 'Array[float, Height]', got 'Array[float, Height, Width]' instead">y</warning>) """); }