[red-knot] Move type_alias_types test to Markdown (#15607)

## Summary

Move `type_alias_types` test to Markdown

## Test Plan

New MD test
This commit is contained in:
David Peter
2025-01-20 09:55:54 +01:00
committed by GitHub
parent 9725a2d476
commit 4eb465ee95
2 changed files with 17 additions and 29 deletions

View File

@@ -76,3 +76,20 @@ type ListOrSet[T] = list[T] | set[T]
# as specified in the `typeshed` stubs.
reveal_type(ListOrSet.__type_params__) # revealed: @Todo(@property)
```
## `TypeAliasType` properties
Two `TypeAliasType`s are distinct and disjoint, even if they refer to the same type
```py
from knot_extensions import static_assert, is_equivalent_to, is_disjoint_from, TypeOf
type Alias1 = int
type Alias2 = int
type TypeAliasType1 = TypeOf[Alias1]
type TypeAliasType2 = TypeOf[Alias2]
static_assert(not is_equivalent_to(TypeAliasType1, TypeAliasType2))
static_assert(is_disjoint_from(TypeAliasType1, TypeAliasType2))
```