Skip to content

Commit 49f8475

Browse files
committed
One more tests (just in case)
1 parent 4f682eb commit 49f8475

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test-data/unit/check-incremental.test

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6175,6 +6175,29 @@ main:5: error: Call to abstract method "meth" of "Base" with trivial body via su
61756175
from mod1 import Alias1
61766176
from typing import Literal
61776177
x: Alias1
6178+
def expect_int(x: int) -> None: pass
6179+
expect_int(x)
6180+
[file mod1.py]
6181+
from mod2 import Alias2
6182+
Alias1 = Alias2
6183+
[file mod2.py]
6184+
from mod3 import Alias3
6185+
Alias2 = Alias3
6186+
[file mod3.py]
6187+
from typing import Literal
6188+
Alias3 = int
6189+
[file mod3.py.2]
6190+
from typing import Literal
6191+
Alias3 = str
6192+
[builtins fixtures/tuple.pyi]
6193+
[out]
6194+
[out2]
6195+
main:5: error: Argument 1 to "expect_int" has incompatible type "str"; expected "int"
6196+
6197+
[case testLiteralCoarseGrainedChainedAliases2]
6198+
from mod1 import Alias1
6199+
from typing import Literal
6200+
x: Alias1
61786201
def expect_3(x: Literal[3]) -> None: pass
61796202
expect_3(x)
61806203
[file mod1.py]

0 commit comments

Comments
 (0)