Commit Graph

6 Commits

Author SHA1 Message Date
Brent Royal-Gordon
c37fee1719 Add parallel tests for static subscripts
This commit modifies various subscript-related test files to add static subscript equivalents of existing tests.
2019-04-10 23:17:04 -07:00
Brent Royal-Gordon
473fe7027e Make sure we don’t support @objc class subscripts
Obj-C subscripts don’t work on class objects, but you can declare class methods with the appropriate names. We don’t want to half-support this. Emit an error if you try to write “@objc class subscript” and test that we don’t import the methods as subscripts.
2019-04-10 23:17:04 -07:00
Brent Royal-Gordon
8b0e61aae0 Infer final on static subscripts 2019-04-10 23:17:04 -07:00
Brent Royal-Gordon
7a41c3874b Permit subscripting types without using .self 2019-04-10 23:17:04 -07:00
Brent Royal-Gordon
e42939d9bb Correctly apply typechecking solutions with subscripts on type instances 2019-04-10 23:09:44 -07:00
Brent Royal-Gordon
d9732a050f Allow the declaration of static subscripts
In this commit, MyStruct.self[0] parses and typechecks but the solution doesn’t apply correctly. MyStruct[0] gets diagnosed as an error.
2019-04-10 23:09:44 -07:00