mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
These are tests that fail in the next commit without this flag. This does not add -verify-ignore-unrelated to all tests with -verify, only the ones that would fail without it. This is NFC since this flag is currently a no-op.
22 lines
1006 B
Swift
22 lines
1006 B
Swift
//===--- Random.swift -----------------------------------------------------===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2021 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: %target-typecheck-verify-swift -verify-ignore-unrelated
|
|
|
|
struct Jawn { }
|
|
|
|
// Me, sobbing: "Look, you can't just point at an empty struct and call it a
|
|
// RandomNumberGenerator."
|
|
// Swift 5.4, pointing at this Jawn: "RNG."
|
|
extension Jawn: RandomNumberGenerator { }
|
|
// expected-error@-1 {{type 'Jawn' does not conform to protocol 'RandomNumberGenerator'}}
|
|
// expected-error@-2 {{unavailable instance method 'next()' was used to satisfy a requirement of protocol 'RandomNumberGenerator'}}
|