Skip to content

Commit ddade0a

Browse files
committed
Add validation test under compiler crashers fixed
1 parent a8d162f commit ddade0a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// This source file is part of the Swift.org open source project
2+
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
// Licensed under Apache License v2.0 with Runtime Library Exception
4+
//
5+
// See https://swift.org/LICENSE.txt for license information
6+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
7+
8+
// RUN: not %target-swift-frontend %s -O -whole-module-optimization
9+
10+
class ClassA<T> { }
11+
protocol ProtocolA { }
12+
13+
class MainClass<H> {
14+
init(x: ClassA<H> & ProtocolA) { }
15+
}
16+
17+
final class ClassB: ClassA<String> { }
18+
extension ClassB: ProtocolA { }
19+
20+
_ = MainClass(x: ClassB())

0 commit comments

Comments
 (0)