File tree Expand file tree Collapse file tree 5 files changed +22
-6
lines changed Expand file tree Collapse file tree 5 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ split_embedded_sources(
98
98
EMBEDDED Integers.swift
99
99
NORMAL Join.swift
100
100
EMBEDDED KeyPath.swift
101
- NORMAL KeyValuePairs.swift
101
+ EMBEDDED KeyValuePairs.swift
102
102
EMBEDDED LazyCollection.swift
103
103
EMBEDDED LazySequence.swift
104
104
NORMAL LegacyABI.swift
@@ -227,7 +227,7 @@ split_embedded_sources(
227
227
EMBEDDED FloatingPointRandom.swift
228
228
EMBEDDED Instant.swift
229
229
EMBEDDED Int128.swift
230
- NORMAL Mirror.swift
230
+ EMBEDDED Mirror.swift
231
231
NORMAL PlaygroundDisplay.swift
232
232
NORMAL CommandLine.swift
233
233
EMBEDDED SliceBuffer.swift
Original file line number Diff line number Diff line change @@ -15,10 +15,9 @@ import SwiftShims
15
15
/// String
16
16
17
17
@_unavailableInEmbedded
18
- extension String {
19
- public init < Subject> ( describing instance: Subject ) { fatalError ( ) }
20
- public init < Subject> ( reflecting instance: Subject ) { fatalError ( ) }
21
- }
18
+ internal func _print_unlocked< T> ( _ value: T , _ target: inout String ) { fatalError ( ) }
19
+ @_unavailableInEmbedded
20
+ public func _debugPrint_unlocked< T> ( _ value: T , _ target: inout String ) { fatalError ( ) }
22
21
23
22
/// Codable
24
23
Original file line number Diff line number Diff line change @@ -125,13 +125,15 @@ extension KeyValuePairs: RandomAccessCollection {
125
125
}
126
126
}
127
127
128
+ @_unavailableInEmbedded
128
129
extension KeyValuePairs : CustomStringConvertible {
129
130
/// A string that represents the contents of the dictionary.
130
131
public var description : String {
131
132
return _makeKeyValuePairDescription ( )
132
133
}
133
134
}
134
135
136
+ @_unavailableInEmbedded
135
137
extension KeyValuePairs : CustomDebugStringConvertible {
136
138
/// A string that represents the contents of the dictionary, suitable for
137
139
/// debugging.
Original file line number Diff line number Diff line change @@ -538,6 +538,7 @@ extension Mirror {
538
538
539
539
//===--- General Utilities ------------------------------------------------===//
540
540
541
+ @_unavailableInEmbedded
541
542
extension String {
542
543
/// Creates a string representing the given value.
543
544
///
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-emit-ir -verify %s -enable-experimental-feature Embedded -wmo
2
+
3
+ // REQUIRES: swift_in_compiler
4
+ // REQUIRES: optimized_stdlib
5
+ // REQUIRES: OS=macosx || OS=linux-gnu
6
+
7
+ public struct MyStruct {
8
+ var a , b , c : Int
9
+ }
10
+
11
+ public func foo( s: MyStruct ) {
12
+ let mirror = Mirror ( reflecting: s) // expected-error {{'Mirror' is unavailable}}
13
+ _ = mirror. children
14
+ }
You can’t perform that action at this time.
0 commit comments