-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SR-4272] Assertion failed: ((HadError || !M.is<SourceFile*>() || M.get<SourceFile*>()->ASTStage < SourceFile::TypeChecked) && "UnresolvedDot" "in wrong phase" #46855
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
Comments
@swift-ci create |
This is clearly invalid – why aren't we diagnosing it? |
Why is it clearly invalid? Looks fine to me. |
What is `start...`? Do we have a postfix `...` operator now? I should probably learn the language before trying to implement it one day. |
It's defined in the branch I said to reproduce this with. |
The later SR-4314 has a reduced test case with the same backtrace. |
I hit this crash today with this smaller reproducer. struct ArrayWrapper<Element>: Collection
where Element: Comparable {
private var store = [Element]()
typealias SubSequence = ArrayWrapper<Element>
init(_ values: [Element]) {
store = values
}
var startIndex: Int {
return store.startIndex
}
var endIndex: Int {
return store.endIndex
}
subscript(position: Int) -> Iterator.Element {
return store[index]
}
func makeIterator() -> AnyIterator<Element> {
var index = 0
return AnyIterator {
guard index < self.store.count else { return nil }
defer { index += 1 }
return self.store[index]
}
}
}
print(ArrayWrapper([22, 3, 1, 44, 6, 22])) Stack dump:
0. Program arguments: /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2017-03-23-a.xctoolchain/usr/bin/swift -frontend -interpret /tmp/collection.swift -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -color-diagnostics -module-name collection
1. While walking into decl 'ArrayWrapper' at /tmp/collection.swift:3:1
2. While walking into body of getter for subscript(_:) at /tmp/collection.swift:21:5 |
This appears to have been fixed somewhere along the way, because it no longer reproduces. |
@rudkx or @harlanhaskins, do you mind adding Harlan's reduced test case to validation-test/compiler_crashers_2_fixed? It would be good to ensure it doesn't break again, and it exercises a good cross-section of the type checker. |
Actually never mind, I'll stop being lazy and do it myself :-) |
@rudkx or @DougGregor – is this expected, though?
|
I didn't hit that when I tried that test case earlier today. |
It's failing with latest master. Could be a recent regression? |
Okay, now I'm not totally confident that I didn't see some errors when I tried to reproduce this, just that I didn't see the assert. |
Additional Detail from JIRA
md5: 73a52146b47d89cc39d6ae48f10280cc
is duplicated by:
relates to:
Issue Description:
Build the compiler for this crash:
other hashes:
clang f95defb935 Merge remote-tracking branch 'origin/swift-4.0-branch' into stable
cmark d875488 Merge pull request #4 from llvm-beanz/generate-cmark-exports
compiler-rt d8d2f6422 Merge remote-tracking branch 'origin/swift-4.0-branch' into stable
llbuild 360bcdd [devel] Add a Vagrantfile.
lldb 9ca9758f9 Merge pull request #149 from bitjammer/swift-typealias-equal-sourceloc
llvm cf5ed9132f2 Merge remote-tracking branch 'origin/swift-4.0-branch' into stable
ninja 0b0374e Merge pull request #1255 from tchajed/bind-localhost
swift f282dc3 [stdlib] UnicodeStorage => _UnicodeViews
swift-corelibs-foundation 3c78f9c Merge pull request #916 from swizzlr/master
swift-corelibs-libdispatch 1cc64e1 Review comments.
swift-corelibs-xctest 50cc074 XCTestAssertNoThrow (#184)
swift-integration-tests 8ae3586 Merge pull request #18 from apple/disable-lldb-test
swift-xcode-playground-support 9e980f2 Temporary disable test to get the incremental bot blue again
swiftpm 154fdea Merge pull request #1017 from aciidb0mb3r/non-throwing-workspace
The text was updated successfully, but these errors were encountered: