Skip to content

Commit

Permalink
Add validation test under compiler crashers fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
zoecarver committed Nov 1, 2019
1 parent a8d162f commit ddade0a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions validation-test/compiler_crashers_2_fixed/sr11624.swift
@@ -0,0 +1,20 @@
// This source file is part of the Swift.org open source project
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors

// RUN: not %target-swift-frontend %s -O -whole-module-optimization

class ClassA<T> { }
protocol ProtocolA { }

class MainClass<H> {
init(x: ClassA<H> & ProtocolA) { }
}

final class ClassB: ClassA<String> { }
extension ClassB: ProtocolA { }

_ = MainClass(x: ClassB())

0 comments on commit ddade0a

Please sign in to comment.