mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[embedded] Allow metadata for DynamicSelfType to support using Self in classes
This commit is contained in:
22
test/embedded/dynamic-self.swift
Normal file
22
test/embedded/dynamic-self.swift
Normal file
@@ -0,0 +1,22 @@
|
||||
// RUN: %target-swift-emit-ir %s -enable-experimental-feature Embedded -parse-as-library | %FileCheck %s
|
||||
|
||||
// REQUIRES: swift_in_compiler
|
||||
// REQUIRES: VENDOR=apple
|
||||
// REQUIRES: OS=macosx
|
||||
|
||||
class MyClass {
|
||||
init() {
|
||||
Self.static_foo()
|
||||
}
|
||||
|
||||
static func static_foo() {}
|
||||
}
|
||||
|
||||
@main
|
||||
struct Main {
|
||||
static func main() {
|
||||
_ = MyClass()
|
||||
}
|
||||
}
|
||||
|
||||
// CHECK: define {{.*}}@main(
|
||||
Reference in New Issue
Block a user