Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0177-rdar-33093935.swift
Doug Gregor ae5acb9147 [Type checker] Check for recursion when evaluating @objc on a property.
Fixes crash from rdar://problem/33093935.
2018-10-06 23:21:00 -07:00

15 lines
406 B
Swift

// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -primary-file %s %S/Inputs/0177-rdar-33093935-other.swift -verify
// REQUIRES: objc_interop
import Foundation
extension A {
static func superclass() -> AnyObject? { return nil }
@objc var name: String { return "hi" }
}
class B: A {
@objc var foo = superclass()?.name // expected-error{{property 'foo' references itself}}
}