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:
Chris Lattner
2015-07-10 19:52:09 +00:00
parent 0e05d51878
commit 7b5c8bf92b
7 changed files with 27 additions and 55 deletions

View File

@@ -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