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(
9898 EMBEDDED Integers.swift
9999 NORMAL Join.swift
100100 EMBEDDED KeyPath.swift
101- NORMAL KeyValuePairs.swift
101+ EMBEDDED KeyValuePairs.swift
102102 EMBEDDED LazyCollection.swift
103103 EMBEDDED LazySequence.swift
104104 NORMAL LegacyABI.swift
@@ -227,7 +227,7 @@ split_embedded_sources(
227227 EMBEDDED FloatingPointRandom.swift
228228 EMBEDDED Instant.swift
229229 EMBEDDED Int128.swift
230- NORMAL Mirror.swift
230+ EMBEDDED Mirror.swift
231231 NORMAL PlaygroundDisplay.swift
232232 NORMAL CommandLine.swift
233233 EMBEDDED SliceBuffer.swift
Original file line number Diff line number Diff line change @@ -15,10 +15,9 @@ import SwiftShims
1515/// String
1616
1717@_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 ( ) }
2221
2322/// Codable
2423
Original file line number Diff line number Diff line change @@ -125,13 +125,15 @@ extension KeyValuePairs: RandomAccessCollection {
125125 }
126126}
127127
128+ @_unavailableInEmbedded
128129extension KeyValuePairs : CustomStringConvertible {
129130 /// A string that represents the contents of the dictionary.
130131 public var description : String {
131132 return _makeKeyValuePairDescription ( )
132133 }
133134}
134135
136+ @_unavailableInEmbedded
135137extension KeyValuePairs : CustomDebugStringConvertible {
136138 /// A string that represents the contents of the dictionary, suitable for
137139 /// debugging.
Original file line number Diff line number Diff line change @@ -538,6 +538,7 @@ extension Mirror {
538538
539539//===--- General Utilities ------------------------------------------------===//
540540
541+ @_unavailableInEmbedded
541542extension String {
542543 /// Creates a string representing the given value.
543544 ///
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