You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/expr/expressions.swift
+8-13Lines changed: 8 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -93,11 +93,11 @@ do {
93
93
#column // expected-warning {{#column literal is unused}}
94
94
#function // expected-warning {{#function literal is unused}}
95
95
#dsohandle // expected-warning {{#dsohandle literal is unused}}
96
-
__FILE__ // expected-error {{__FILE__ has been replaced with #file in Swift 3}} expected-warning {{#file literal is unused}}
97
-
__LINE__ // expected-error {{__LINE__ has been replaced with #line in Swift 3}} expected-warning {{#line literal is unused}}
98
-
__COLUMN__ // expected-error {{__COLUMN__ has been replaced with #column in Swift 3}} expected-warning {{#column literal is unused}}
99
-
__FUNCTION__ // expected-error {{__FUNCTION__ has been replaced with #function in Swift 3}} expected-warning {{#function literal is unused}}
100
-
__DSO_HANDLE__ // expected-error {{__DSO_HANDLE__ has been replaced with #dsohandle in Swift 3}} expected-warning {{#dsohandle literal is unused}}
96
+
__FILE__ // expected-error {{cannot find '__FILE__' in scope}}
97
+
__LINE__ // expected-error {{cannot find '__LINE__' in scope}}
98
+
__COLUMN__ // expected-error {{cannot find '__COLUMN__' in scope}}
99
+
__FUNCTION__ // expected-error {{cannot find '__FUNCTION__' in scope}}
100
+
__DSO_HANDLE__ // expected-error {{cannot find '__DSO_HANDLE__' in scope}}
101
101
102
102
nil // expected-error {{'nil' requires a contextual type}}
103
103
#fileLiteral(resourceName:"what.txt") // expected-error {{could not infer type of file reference literal}} expected-note * {{}}
@@ -172,7 +172,7 @@ var test1b = { 42 }
172
172
vartest1c={{42}}
173
173
vartest1d={{{42}}}
174
174
175
-
func test2(_ a:Int, b:Int)->(c:Int){ // expected-error{{cannot create a single-element tuple with an element label}} {{34-37=}} expected-note {{did you mean 'a'?}} expected-note {{did you mean 'b'?}}
175
+
func test2(_ a:Int, b:Int)->(c:Int){ // expected-error{{cannot create a single-element tuple with an element label}}
176
176
_ = a+b
177
177
a+b+c // expected-error{{cannot find 'c' in scope}}
0 commit comments