Skip to content

Commit 3fbd612

Browse files
committed
tests: adapt to removal of Boolean protocol
1 parent 797bd1b commit 3fbd612

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

validation-test/compiler_crashers_fixed/00017-llvm-foldingset-llvm-attributesetnode-nodeequals.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@
66
// See http://swift.org/LICENSE.txt for license information
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

9-
// RUN: not %target-swift-frontend %s -parse -verify
9+
// RUN: %target-swift-frontend %s -parse -verify
1010

1111
// Issue found by https://github.com/jvasileff (John Vasileff)
1212
// This bug is NOT triggered when compiling with -O.
1313

14-
func f<T : Boolean>(_ b: T) {
14+
protocol BooleanProtocol {
15+
var boolValue: Bool { get }
1516
}
16-
f(true as Boolean) // expected-error {{cannot invoke 'f' with an argument list of type '(Boolean)'}} // expected-note {{expected an argument list of type '(T)'}}
17+
extension Bool : BooleanProtocol {
18+
var boolValue: Bool { return self }
19+
}
20+
func f<T : BooleanProtocol>(_ b: T) {
21+
}
22+
f(true as BooleanProtocol) // expected-error {{cannot invoke 'f' with an argument list of type '(BooleanProtocol)'}} // expected-note {{expected an argument list of type '(T)'}}

0 commit comments

Comments
 (0)