Skip to content

Commit 88a506e

Browse files
Update check-final.test
1 parent 84f705a commit 88a506e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test-data/unit/check-final.test

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,3 +1336,19 @@ class S9(S2, S4): # E: Class "S9" has incompatible disjoint bases
13361336
pass
13371337

13381338
[builtins fixtures/tuple.pyi]
1339+
1340+
[case testFinalJoin]
1341+
from typing import Final
1342+
1343+
x: Final = " ".join(("hello","my","name","is","joe"))
1344+
y: Final = " ".join(["hello","joe","my","name","is","moe"])
1345+
1346+
reveal_type(x) # N: Revealed type is "Literal['hello my name is joe']?"
1347+
reveal_type(y) # N: Revealed type is "Literal['hello joe my name is moe']?"
1348+
1349+
# TODO: implement me
1350+
constant_fold_not_yet_supported: Final = "you", "cant", "fold", "this", "yet"
1351+
z: Final = " ".join(constant_fold_not_yet_supported)
1352+
1353+
reveal_type(z) # N: Revealed type is "builtins.str"
1354+
[out]

0 commit comments

Comments
 (0)