mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
- 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
9 lines
396 B
Swift
9 lines
396 B
Swift
// RUN: %target-swift-frontend -parse -enable-source-import -primary-file %s %S/Inputs/multi-file-with-main/main.swift -module-name=MultiFile -sdk "" -verify
|
|
|
|
func testOperator() {
|
|
let x: Int = 1 +++ "abc" // expected-error {{binary operator '+++' cannot be applied to operands of type 'Int' and 'String'}}
|
|
// expected-note @-1 {{expected an argument list of type '(Int, Int)'}}
|
|
|
|
_ = x
|
|
}
|