Files
swift-mirror/test/Constraints/rdar40002266.swift
Evan Wilde a5f11c4851 Fix the main->next merge conflicts
This cleans up all of the merge conflicts from main into next after the
rebranch merge.
2021-10-15 15:57:55 -07:00

12 lines
427 B
Swift

// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s
// REQUIRES: objc_interop
import Foundation
struct S {
init<T: NSNumber>(_ num: T) { // expected-note {{where 'T' = 'Bool'}}
self.init(num != 0) // expected-error {{initializer 'init(_:)' requires that 'Bool' inherit from 'NSNumber'}}
// expected-error@-1 {{cannot convert value of type 'T' to expected argument type 'Int'}}
}
}