forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SR-12460] Don't crash when missing a type in a Diagnostic message. (s…
…wiftlang#30979) * Don't crash when missing a type in a Diagnostic message. Print an empty string for the missing type. Resolves SR-12460 * Added new diagnostic message, eg. "operator '==' declared in extension must be 'static'"
- Loading branch information
Showing
4 changed files
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// RUN: %target-swift-ide-test -print-indexed-symbols -source-filename %s 2>&1 | %FileCheck -check-prefix CHECK %s | ||
|
||
// Test that we don't crash when validating members inside an extension with no type name. | ||
|
||
// CHECK: :[[@LINE+1]]:11: error: expected type name in extension declaration | ||
extension { | ||
// CHECK: :[[@LINE+1]]:8: error: operator '==' declared in extension must be 'static' | ||
func ==(lhs: Any, rhs: Any) -> Bool {} | ||
} |