forked from swiftlang/swift
- Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfixits-apply-all.swift
26 lines (19 loc) · 663 Bytes
/
fixits-apply-all.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// This tests whether we accept fixits from warnings without filtering.
// The particular diagnostics used are not important.
// RUN: %swift -typecheck -target %target-triple %s -fixit-all -emit-fixits-path %t.remap
// RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result
func ftest1(){
letmyvar=0
}
func foo()->Int{
do{
}catchvar err{
goo(err)
}
}
func goo(_ e:Error){
}
@warn_unused_result(message="test message")
func warn_unused_result_removal()->Int{return5}
@discardableResultfunc discardableResultOnVoidFunc(){}
@discardableResultfunc discardableResultOnNeverFunc()->Never{fatalError()}