mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
In Swift 4 mode, no longer consider e.g. 'nsNumber as Int' or 'nsValue as NSRange' to be valid coercions. This would break compatibility with Swift 3, so in Swift 3 mode, accept the coercion, but *also* accept a checked cast without a warning, and raise a migration warning about the unchecked coercion.
39 lines
1.3 KiB
C++
39 lines
1.3 KiB
C++
//===--- KnownFoundationEntities.def - Objective-C Foundation ---*- C++ -*-===//
|
|
//
|
|
// 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines macros used for macro-metaprogramming with
|
|
// compiler-known entities in the Objective-C Foundation module (and
|
|
// the ObjectiveC module it depends on).
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
#ifndef FOUNDATION_ENTITY
|
|
# error define FOUNDATION_ENTITY(Name)
|
|
#endif
|
|
|
|
FOUNDATION_ENTITY(NSArray)
|
|
FOUNDATION_ENTITY(NSCopying)
|
|
FOUNDATION_ENTITY(NSDictionary)
|
|
FOUNDATION_ENTITY(NSError)
|
|
FOUNDATION_ENTITY(NSErrorPointer)
|
|
FOUNDATION_ENTITY(NSInteger)
|
|
FOUNDATION_ENTITY(NSNumber)
|
|
FOUNDATION_ENTITY(NSObject)
|
|
FOUNDATION_ENTITY(NSRange)
|
|
FOUNDATION_ENTITY(NSSet)
|
|
FOUNDATION_ENTITY(NSString)
|
|
FOUNDATION_ENTITY(NSUInteger)
|
|
FOUNDATION_ENTITY(NSURL)
|
|
FOUNDATION_ENTITY(NSValue)
|
|
FOUNDATION_ENTITY(NSZone)
|
|
|
|
#undef FOUNDATION_ENTITY
|