mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add test case, correct existing test case
Existing: String assignment to a numeric indexer should succeed, not fail. (The baseline was already correct but the inline comment was wrong.) New: Boolean assignment to a numeric indexer should fail.
This commit is contained in:
1 parent
8eacd41ab0
commit
5cd0ca19af
3 files changed
+14
-5
No files matched your search
@@ -6,5 +6,6 @@ y = x; // Ok because index signature type is any
|
||||
x = z; // Error
|
||||
z = x; // Ok because index signature type is any
|
||||
y = "foo"; // Error
|
||||
z = "foo"; // Error
|
||||
z = "foo"; // OK, string has numeric indexer
|
||||
z = false; // Error
|
||||
|
||||
Reference in new issue
Block a user