Skip to content

Commit 8ee33d2

Browse files
committed
[embedded] Use #if instead of unavailability for _undefined
1 parent 996f51e commit 8ee33d2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

stdlib/public/core/AssertCommon.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,9 @@ func _unimplementedInitializer(className: StaticString,
252252
Builtin.int_trap()
253253
}
254254

255+
#if !$Embedded
256+
255257
/// Used to evaluate editor placeholders.
256-
@_unavailableInEmbedded
257258
public // COMPILER_INTRINSIC
258259
func _undefined<T>(
259260
_ message: @autoclosure () -> String = String(),
@@ -262,6 +263,8 @@ func _undefined<T>(
262263
_assertionFailure("Fatal error", message(), file: file, line: line, flags: 0)
263264
}
264265

266+
#else
267+
265268
/// Used to evaluate editor placeholders.
266269
public // COMPILER_INTRINSIC
267270
func _undefined<T>(
@@ -271,6 +274,8 @@ func _undefined<T>(
271274
_assertionFailure("Fatal error", message(), file: file, line: line, flags: 0)
272275
}
273276

277+
#endif
278+
274279
/// Called when falling off the end of a switch and the type can be represented
275280
/// as a raw value.
276281
///

0 commit comments

Comments
 (0)