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:
Nathan Shively-Sanders
2015-10-15 11:04:36 -07:00
parent 8eacd41ab0
commit 5cd0ca19af
3 changed files with 14 additions and 5 deletions

View File

@@ -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