mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Adjust the valid position checking and special handle EOF position. If the requested location is at EOF, use the last token, but still emit the diagnostics at the specificied location. rdar://138426038
20 lines
414 B
Swift
20 lines
414 B
Swift
// RUN: not %target-swift-frontend -typecheck %s 2>&1 | %FileCheck %s --check-prefix=CHECK-NO-ASSERTION
|
|
|
|
// CHECK-NO-ASSERTION-NOT: Assertion
|
|
// Used to trip an assertion
|
|
|
|
|
|
public struct Foo {
|
|
func bar() {
|
|
var copySelf = self
|
|
repeat { copySelf
|
|
|
|
private extension String {}
|
|
|
|
// Note: extra newlines below ensure that context printing doesn't show the
|
|
// lines that we shouldn't see.
|
|
|
|
|
|
|
|
// EOF
|