mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We checked for an import of a module named 'Foundation' before checking if Objective-C interoperability was enabled, which would lead to hilarious results. Fixes <https://bugs.swift.org/browse/SR-13713> / <rdar://problem/70140319>.
12 lines
363 B
Swift
12 lines
363 B
Swift
// RUN: %sourcekitd-test -req=sema %s -- %s > %t.response
|
|
// RUN: %FileCheck -input-file=%t.response %s
|
|
// This tests that we are not crashing in SILGen.
|
|
|
|
// CHECK: {{Objective-C interoperability is disabled|@objc attribute used without importing module}}
|
|
@objc protocol Communicate {
|
|
var name: String { get }
|
|
}
|
|
class Cat : Communicate {
|
|
let name = "Felix"
|
|
}
|