mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Within the compiler, we use the term "layout constraint" for any constraint that affects the layout of a type parameter that has that constraint. However, the only user-visible constraint is "AnyObject", and calling that a layout constraint is confusing. Drop the term "layout" from diagnostics. Fixes rdar://problem/35295372.
8 lines
446 B
Swift
8 lines
446 B
Swift
// RUN: %target-typecheck-verify-swift -swift-version 3
|
|
// RUN: %target-typecheck-verify-swift -swift-version 4
|
|
// RUN: not %target-swift-frontend -tyepcheck -swift-version 5
|
|
|
|
protocol P : class, AnyObject { } // expected-warning{{redundant inheritance from 'AnyObject' and Swift 3 'class' keyword}}{{14-21=}}
|
|
// expected-warning@-1{{redundant constraint 'Self' : 'AnyObject'}}
|
|
// expected-note@-2{{constraint 'Self' : 'AnyObject' written here}}
|