// RUN: %empty-directory(%t)
// RUN: %empty-directory(%t/Modules)
// RUN: split-file --leading-lines %s %t
// RUN: %target-swift-frontend \
// RUN: -emit-module \
// RUN: -module-name MyModule \
// RUN: -emit-module-path %t/Modules/MyModule.swiftmodule \
// RUN: %t/MyModule.swift
//--- MyModule.swift
public class UserCollection {
public static let sharedStatic = UserCollection()
public class var sharedComputedClass: UserCollection { UserCollection() }
}
//--- test.swift
import MyModule
func application() {
// RUN: %sourcekitd-test -req=cursor -pos=%(line+1):18 %t/test.swift -- %t/test.swift -I %t/Modules -target %target-triple -Xfrontend -sil-verify-none | %FileCheck %s --check-prefix=SHARED_STATIC
UserCollection.sharedStatic
// FIXME: This should be reported as 'static var' rdar://105239467
// SHARED_STATIC: class let sharedStatic: UserCollection
// SHARED_STATIC: class let sharedStatic: UserCollection
// RUN: %sourcekitd-test -req=cursor -pos=%(line+1):18 %t/test.swift -- %t/test.swift -I %t/Modules -target %target-triple | %FileCheck %s --check-prefix=SHARED_COMPUTED_CLASS
UserCollection.sharedComputedClass
// SHARED_COMPUTED_CLASS: class var sharedComputedClass: UserCollection { get }
// SHARED_COMPUTED_CLASS: class var sharedComputedClass: UserCollection { get }
}