mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Several cleanups:
- Remove all uses of CleanupIllFormedExpressionRAII from this file, which are now unnecessary since this is handled at a higher level. - Stop splatting ErrorType in the diagnostics stuff. This was formerly needed to indicate that a diagnostic is emitted, but is now handled other ways. Removing this enables the type checker to produce other follow on warnings in some cases (e.g. var should be marked let). - Remove an arbitrary limitation on unop and binops that didn't print an overload candidate set with one entry, leading to better consistency in diagnostics, now that all the pieces are in place to make this not be super annoying. Swift SVN r30084
This commit is contained in:
@@ -100,6 +100,7 @@ infix operator **** {
|
||||
|
||||
func ****(_: Int, _: String) { }
|
||||
i **** i // expected-error{{binary operator '****' cannot be applied to two Int operands}}
|
||||
// expected-note @-1 {{expected an argument list of type '(Int, String)'}}
|
||||
|
||||
infix operator ***~ {
|
||||
associativity left
|
||||
@@ -108,6 +109,7 @@ infix operator ***~ {
|
||||
|
||||
func ***~(_: Int, _: String) { }
|
||||
i ***~ i // expected-error{{binary operator '***~' cannot be applied to two Int operands}}
|
||||
// expected-note @-1 {{expected an argument list of type '(Int, String)'}}
|
||||
|
||||
// <rdar://problem/20142523>
|
||||
// FIXME: poor diagnostic, to be fixed in 20142462. For now, we just want to
|
||||
|
||||
Reference in New Issue
Block a user