Files
swift-mirror/test/Migrator/objc_inference_noop.swift
Nathan Hawes d5d058a768 [migrator] Only enable Swift 3 ObjC inference warnings when migrating from Swift 3
They were always enabled, meaning migrating from Swift 4 -> 4.2 would pick up
the associated fixits and add @objc unnecessarily in many places.

Resolves rdar://problem/39951671
2018-05-03 13:34:45 -07:00

11 lines
467 B
Swift

// REQUIRES: objc_interop
// RUN: %target-swift-frontend -typecheck -swift-version 4 %s
// RUN: %empty-directory(%t) && %target-swift-frontend -c -primary-file %s -swift-version 4 -emit-migrated-file-path %t/objc_inference_noop.swift.result -emit-remap-file-path %t/objc_inference_noop.swift.remap -migrate-keep-objc-visibility -o /dev/null
// RUN: diff -u %s %t/objc_inference_noop.swift.result
import Foundation
@objc class Foo : NSObject {
var foo: Int = 10
}