@@ -13610,6 +13610,7 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
13610
13610
['Self', { alias: '', module: 'builtins' }],
13611
13611
['NoReturn', { alias: '', module: 'builtins' }],
13612
13612
['Never', { alias: '', module: 'builtins' }],
13613
+ ['LiteralString', { alias: '', module: 'builtins' }],
13613
13614
]);
13614
13615
13615
13616
const aliasMapEntry = specialTypes.get(assignedName);
@@ -16956,6 +16957,10 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
16956
16957
case 'Self': {
16957
16958
return createSelfType(classType, errorNode, typeArgs);
16958
16959
}
16960
+
16961
+ case 'LiteralString': {
16962
+ return createSpecialType(classType, typeArgs, 0);
16963
+ }
16959
16964
}
16960
16965
}
16961
16966
@@ -20750,6 +20755,12 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
20750
20755
}
20751
20756
}
20752
20757
20758
+ if (ClassType.isBuiltIn(destType, 'LiteralString') && ClassType.isBuiltIn(concreteSrcType, 'str')) {
20759
+ if (concreteSrcType.literalValue !== undefined) {
20760
+ return true;
20761
+ }
20762
+ }
20763
+
20753
20764
if (
20754
20765
!canAssignClass(
20755
20766
ClassType.cloneAsInstantiable(destType),
0 commit comments