Skip to content
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

[SR-10017] Missing test superclass coercion test case #3523

Open
davezarzycki opened this issue Feb 28, 2019 · 0 comments
Open

[SR-10017] Missing test superclass coercion test case #3523

davezarzycki opened this issue Feb 28, 2019 · 0 comments

Comments

@davezarzycki
Copy link
Collaborator

Previous ID SR-10017
Radar None
Original Reporter @davezarzycki
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Foundation, TypeChecker
Assignee None
Priority Medium

md5: 33239f17e219876691dde6d8f1d38482

Issue Description:

In the following pull request, I thought that some superclass coercion logic was dead code because the test suite passed. That being said, Foundation fails to compile with the pull request, which means the test suite has a hole in it:

apple/swift#22945

For reference, the Foundation crash:

```

  1. While type-checking 'appendingPathExtension(_🙂' (at /home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/swift-corelibs-foundation/Foundation/NSPathUtilities.swift:302:12)
  2. While type-checking statement at [/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/swift-corelibs-foundation/Foundation/NSPathUtilities.swift:302:66 - line:309:5] RangeText="{
    if str.hasPrefix("/") || self == "" || self == "/" {
    print("Cannot append extension (str) to path (self)")
    return nil
    }
    let result = _swiftObject._stringByFixingSlashes(compress: false, stripTrailing: true) + "." + str
    return result._stringByFixingSlashes()
    "
  3. While type-checking statement at [/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/swift-corelibs-foundation/Foundation/NSPathUtilities.swift:303:9 - line:306:9] RangeText="if str.hasPrefix("/") || self == "" || self == "/" {
    print("Cannot append extension (str) to path (self)")
    return nil
    "
  4. While type-checking expression at [/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/swift-corelibs-foundation/Foundation/NSPathUtilities.swift:303:12 - line:303:56] RangeText="str.hasPrefix("/") || self == "" || self == "
    #0 0x00000000048aebd4 PrintStackTraceSignalHandler(void*) (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0x48aebd4)
    Fixing whitespace formatting #1 0x00000000048ac7f0 llvm::sys::RunSignalHandlers() (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0x48ac7f0)
    Fixing grammar issue #2 0x00000000048aeff8 SignalHandler(int) (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0x48aeff8)
    Syntax highlighting in README.md #3 0x00007fa5e61c4390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
    Add @noescape to Synchronous Enumeration, Predicate, and Comparator Blocks #4 0x00007fa5e4903428 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x35428)
    Verify contents of the file attributes dictionary #5 0x00007fa5e490502a abort (/lib/x86_64-linux-gnu/libc.so.6+0x3702a)
    Fix URL in README.md #6 0x000000000480611d llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0x480611d)
    Use Correct Source Index in NSArray.getObjects #7 0x0000000000fdeb51 (anonymous namespace)::ExprRewriter::coerceToType(swift::Expr*, swift::Type, swift::constraints::ConstraintLocatorBuilder, llvm::Optional<swift::Pattern*>) (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0xfdeb51)
    [WIP] Implement NSRangeFromString #8 0x0000000000ff4448 (anonymous namespace)::ExprRewriter::coerceCallArguments(swift::Expr*, swift::AnyFunctionType*, swift::ApplyExpr*, llvm::ArrayRef<swift::Identifier>, bool, swift::constraints::ConstraintLocatorBuilder) (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0xff4448)
    Use Array.reserveCapacity in NSArray/NSMutableArray #9 0x0000000000fe3058 (anonymous namespace)::ExprRewriter::finishApply(swift::ApplyExpr*, swift::Type, swift::constraints::ConstraintLocatorBuilder) (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0xfe3058)
    Fix download link #10 0x0000000000ff6ffa (anonymous namespace)::ExprRewriter::visitApplyExpr(swift::ApplyExpr*) (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0xff6ffa)
    Fix a bug in CFReadStreamGetBuffer for data streams #11 0x0000000000fe53eb (anonymous namespace)::ExprWalker::walkToExprPost(swift::Expr*) (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0xfe53eb)
    Several NSString constructors implemented #12 0x0000000001356319 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0x1356319)
    Change NSURLRequest's HTTPMethod property stub to be readonly #13 0x000000000135808a (anonymous namespace)::Traversal::visitApplyExpr(swift::ApplyExpr*) (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0x135808a)
    Change NSURLRequest's HTTPMethod stub to readonly #14 0x00000000013562f0 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0x13562f0)
    [Need Feedback]: Added bounds checking to NSArray subscript #15 0x000000000135808a (anonymous namespace)::Traversal::visitApplyExpr(swift::ApplyExpr*) (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0x135808a)
    Remove workaround for IRGen bug #16 0x000000000135355b swift::Expr::walk(swift::ASTWalker&) (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0x135355b)
    NSDateInterval use internal setter #17 0x0000000000fdcaf8 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool) (/home/buildnode/jenkins/workspace/swift-PR-Linux/branch-master/buildbot_linux/swift-linux-x86_64/bin/swiftc+0xfdcaf8)
    ```
@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant