We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db10e78 commit c8134dbCopy full SHA for c8134db
test/embedded/metatypes.swift
@@ -0,0 +1,14 @@
1
+// RUN: %target-swift-emit-ir -verify %s -enable-experimental-feature Embedded -wmo
2
+
3
+// REQUIRES: optimized_stdlib
4
+// REQUIRES: VENDOR=apple
5
+// REQUIRES: OS=macosx
6
7
+public func sink<T>(t: T) {}
8
9
+public func test() -> Int {
10
+ let metatype = Int.self
11
+ sink(t: metatype) // expected-error {{cannot use metatype 'Int' in embedded Swift}}
12
+ // expected-note@-1 {{called from here}}
13
+ return 42
14
+}
0 commit comments