Skip to content
Permalink
Branch: master
Commits on Apr 13, 2019
  1. Update “unable to load standard library” test (#23990)

    brentdax committed Apr 13, 2019
    One of the subtests of Misc/fatal_error.swift assumes that Swift.swiftmodule is located purely based on the resource directory. It can now also be located in the SDK, so the test needs to be updated. Fixes <rdar://problem/49665477>.
Commits on Apr 11, 2019
  1. Merge pull request #23358 from brentdax/a-type-is-a-set-of-its-instances

    brentdax committed Apr 11, 2019
    Add static and class subscripts
  2. [NFC] Pick a few nits for Jordan

    brentdax committed Apr 8, 2019
  3. Add parallel tests for static subscripts

    brentdax committed Apr 3, 2019
    This commit modifies various subscript-related test files to add static subscript equivalents of existing tests.
  4. Make sure we don’t support @objc class subscripts

    brentdax committed Apr 3, 2019
    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.
  5. Allow the declaration of static subscripts

    brentdax committed Apr 3, 2019
    In this commit, MyStruct.self[0] parses and typechecks but the solution doesn’t apply correctly. MyStruct[0] gets diagnosed as an error.
Commits on Apr 3, 2019
  1. Merge pull request #23724 from brentdax/static-start

    brentdax committed Apr 3, 2019
    [NFC] Correct assumptions about static AbstractStorageDecls
Commits on Apr 2, 2019
  1. [NFC] Correct constraint system assumption

    brentdax committed Apr 1, 2019
    We currently assume that, if a subscript is declared within a value type’s decl, it must need `self` to be passed inout. This isn’t true for static subscripts, because even though the DeclContext is a value type, the metatype is actually a reference type. Skip this check for non-instance members.
    
    NFC until static subscripts are added.
  2. [NFC] Remove VarDecl guards on staticness checks

    brentdax committed Apr 1, 2019
    Fixes various places where we assume that only a VarDecl can be static so they operate on any AbstractStorageDecl instead. NFC until static subscripts are added.
  3. [NFC] Override-check decls by property, not kind

    brentdax committed Apr 1, 2019
    Rather than figuring out which kind of decl we’re using and then testing the traits it has, check each trait once on the decls where the AST can express it.
    
    This change is NFC currently, but will support static subscripts.
  4. [NFC] AST-level support for static subscripts

    brentdax committed Mar 16, 2019
    * Moves the IsStatic flag from VarDecl to AbstractStorageDecl.
    * Adds a StaticSubscriptKind to SubscriptDecl.
    * Updates serialization for these changes.
    * Updates SubscriptDecl constructor call sites for these changes.
You can’t perform that action at this time.