Skip to content

Allow subclasses of specific instantiations of ObjC generic classes. #2086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2016

Conversation

jckarter
Copy link
Contributor

@jckarter jckarter commented Apr 7, 2016

If a subclass grounds all the type parameters from its base class, we don't have to worry about any erasure edge cases. We should be able to support this, giving existing code that subclasses the nongeneric form of the class a migration path. Spot-fix some places in IRGen where we assume we can't emit static references to ObjC generic classes or metaclasses.

If a subclass grounds all the type parameters from its base class, we don't have to worry about any erasure edge cases. We should be able to support this, giving existing code that subclasses the nongeneric form of the class a migration path. Spot-fix some places in IRGen where we assume we can't emit static references to ObjC generic classes or metaclasses.
@jckarter
Copy link
Contributor Author

jckarter commented Apr 7, 2016

@swift-ci Please test and merge

@jckarter
Copy link
Contributor Author

jckarter commented Apr 7, 2016

@harlanhaskins Is this failure fixed in master?

/Users/buildnode/jenkins/workspace/swift-PR-osx/swift/test/1_stdlib/UIKit.swift:48:20: error: missing argument label 'o:' in call
    printInterface(.unknown))
                   ^
                   o: 
/Users/buildnode/jenkins/workspace/swift-PR-osx/swift/test/1_stdlib/UIKit.swift:51:20: error: missing argument label 'o:' in call
    printInterface(.portrait))
                   ^
                   o: 
/Users/buildnode/jenkins/workspace/swift-PR-osx/swift/test/1_stdlib/UIKit.swift:54:20: error: missing argument label 'o:' in call
    printInterface(.portraitUpsideDown))
                   ^
                   o: 
/Users/buildnode/jenkins/workspace/swift-PR-osx/swift/test/1_stdlib/UIKit.swift:57:20: error: missing argument label 'o:' in call
    printInterface(.landscapeLeft))
                   ^
                   o: 
/Users/buildnode/jenkins/workspace/swift-PR-osx/swift/test/1_stdlib/UIKit.swift:60:20: error: missing argument label 'o:' in call
    printInterface(.landscapeRight))
                   ^
                   o: 

--

********************
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 

2 warning(s) in tests.
Testing Time: 1420.81s
********************
Failing Tests (1):
    Swift :: 1_stdlib/UIKit.swift

  Expected Passes    : 7729
  Expected Failures  : 13
  Unsupported Tests  : 344
  Unexpected Failures: 1

@harlanhaskins
Copy link
Contributor

@jckarter Interesting; no it isn't, but the tests passed when we ran #2047. It's a quick fix, though.

@jckarter jckarter merged commit 66d5971 into swiftlang:master Apr 7, 2016
@jckarter
Copy link
Contributor Author

jckarter commented Apr 7, 2016

Cool, thanks @harlanhaskins.

@jckarter jckarter deleted the generic-objc-subclass branch April 7, 2016 15:42
@harlanhaskins
Copy link
Contributor

The fix is #2088, by the way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants