You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, all classes provide index and setindex because they inherit from Object. It may perhaps be useful to have an ImmutableObject class, but that feels like a separate issue.
Describe the bug
Classes that don't provide index and setindex should raise errors if you try to index them.
To Reproduce
// check index
class A {
}
var b = A()
print b[0] // expect error
Expected behavior
Should raise an error; presently returns nil
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: