Files
swift-mirror/test/Parse/recovery_library.swift
Chris Lattner 3ad108b0be Reapply r29419:
Enhance fixItRemove() to be a bit more careful about what whitespace it leaves around: if the thing it is removing has leading and trailing whitespace already, this nukes an extra space to avoid leaving double spaces or incorrectly indented results.  

This includes an extra fix for looking off the start of a buffer, which extractText doesn't and can't handle.

This fixes <rdar://problem/21045509> Fixit deletes 'let' from non-binding 'if case let' statements, but leaves an extra space




Swift SVN r29449
2015-06-17 16:31:26 +00:00

23 lines
823 B
Swift

// RUN: %target-parse-verify-swift -parse-as-library
//===--- Recovery for extra braces at top level.
//===--- Keep this test the first one in the file.
// Check that we handle multiple consecutive right braces.
} // expected-error{{extraneous '}' at top level}} {{1-3=}}
} // expected-error{{extraneous '}' at top level}} {{1-3=}}
func foo() {}
// Check that we handle multiple consecutive right braces.
} // expected-error{{extraneous '}' at top level}} {{1-3=}}
} // expected-error{{extraneous '}' at top level}} {{1-3=}}
func bar() {}
//===--- Recovery for extra braces at top level.
//===--- Keep this test the last one in the file.
// Check that we handle multiple consecutive right braces.
} // expected-error{{extraneous '}' at top level}} {{1-3=}}
} // expected-error{{extraneous '}' at top level}} {{1-3=}}