Files
swift-mirror/test/Sema/objc_attr_requires_module.swift
Jordan Rose 367bfbc374 Require "import Foundation" to use @objc in library files, too.
Make this diagnostic a little nicer in other ways, too:
- Highlight the whole attribute (including the at-sign).
- Don't hardcode the string "objc".

Swift SVN r25999
2015-03-11 23:07:48 +00:00

5 lines
233 B
Swift

// RUN: %target-build-swift -parse %s -Xfrontend -verify
// RUN: %target-build-swift -parse -parse-as-library %s -Xfrontend -verify
@objc class Foo {} // expected-error {{@objc attribute used without importing module 'Foundation'}}