File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -5279,6 +5279,10 @@ bool FailureDiagnosis::visitApplyExpr(ApplyExpr *callExpr) {
52795279 argLabels))
52805280 return true ;
52815281
5282+ // Diagnose some simple and common errors.
5283+ if (calleeInfo.diagnoseSimpleErrors (callExpr))
5284+ return true ;
5285+
52825286 // Force recheck of the arg expression because we allowed unresolved types
52835287 // before, and that turned out not to help, and now we want any diagnoses
52845288 // from disallowing them.
@@ -5287,10 +5291,6 @@ bool FailureDiagnosis::visitApplyExpr(ApplyExpr *callExpr) {
52875291 if (!argExpr)
52885292 return true ; // already diagnosed.
52895293
5290- // Diagnose some simple and common errors.
5291- if (calleeInfo.diagnoseSimpleErrors (callExpr))
5292- return true ;
5293-
52945294 // A common error is to apply an operator that only has inout forms (e.g. +=)
52955295 // to non-lvalues (e.g. a local let). Produce a nice diagnostic for this
52965296 // case.
Original file line number Diff line number Diff line change @@ -54,10 +54,10 @@ _ = Foo() // expected-error {{'Foo' initializer is inaccessible due to 'internal
5454// <rdar://problem/27982012> QoI: Poor diagnostic for inaccessible initializer
5555struct rdar27982012 {
5656 var x : Int
57- private init ( _ x: Int ) { self . x = x }
57+ private init ( _ x: Int ) { self . x = x } // expected-note {{'init' declared here}}
5858}
5959
60- _ = { rdar27982012 ( $0. 0 ) } ( ( 1 , 2 ) ) // expected-error {{type of expression is ambiguous without more context }}
60+ _ = { rdar27982012 ( $0. 0 ) } ( ( 1 , 2 ) ) // expected-error {{initializer is inaccessible due to 'private' protection level }}
6161
6262// TESTABLE-NOT: :[[@LINE-1]]:{{[^:]+}}:
6363_ = PrivateInit ( ) // expected-error {{'PrivateInit' initializer is inaccessible due to 'private' protection level}}
You can’t perform that action at this time.
0 commit comments