Error messages and tests

This commit is contained in:
Prateek Goel
2018-10-26 10:14:53 +05:30
parent d45eed314a
commit 2fa23e96cd
6 changed files with 18 additions and 18 deletions
+3 -3
View File
@@ -5773,7 +5773,7 @@ namespace ts {
return type.resolvedBaseTypes = emptyArray;
}
if (!isValidBaseType(baseType)) {
error(baseTypeNode.expression, Diagnostics.Base_constructor_return_type_0_is_not_a_class_or_interface_type, typeToString(baseType));
error(baseTypeNode.expression, Diagnostics.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members, typeToString(baseType));
return type.resolvedBaseTypes = emptyArray;
}
if (type === baseType || hasBaseType(baseType, type)) {
@@ -5831,7 +5831,7 @@ namespace ts {
}
}
else {
error(node, Diagnostics.An_interface_can_only_extend_an_object_or_intersection_type_with_statically_known_members);
error(node, Diagnostics.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members);
}
}
}
@@ -25979,7 +25979,7 @@ namespace ts {
}
}
else {
error(typeRefNode, Diagnostics.A_class_can_only_implement_an_object_or_intersection_type_with_statically_known_members);
error(typeRefNode, Diagnostics.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members);
}
}
}
+3 -3
View File
@@ -1056,7 +1056,7 @@
"category": "Error",
"code": 2311
},
"An interface can only extend an object or intersection type with statically known members.": {
"An interface can only extend an object type or intersection of object types with statically known members.": {
"category": "Error",
"code": 2312
},
@@ -1484,7 +1484,7 @@
"category": "Error",
"code": 2420
},
"A class can only implement an object or intersection type with statically known members.": {
"A class can only implement an object type or intersection of object types with statically known members.": {
"category": "Error",
"code": 2422
},
@@ -1816,7 +1816,7 @@
"category": "Error",
"code": 2508
},
"Base constructor return type '{0}' is not a class or interface type.": {
"Base constructor return type '{0}' is not an object type or intersection of object types with statically known members.": {
"category": "Error",
"code": 2509
},