void () { runWithLanguageLevel(LanguageLevel.getLatest(), () -> doTestByText(""" from typing import ClassVar, Type class A: x = None # type: ClassVar[int] def f(a: Type[A]) -> None: <warning descr="Cannot assign to class variable 'x' via instance">a().x</warning> = 0""")); }