[embedded] Enable integer parsing in Embedded Swift

This commit is contained in:
Kuba Mracek
2024-11-13 11:52:37 -08:00
parent 1965f96aff
commit b370050dd0
2 changed files with 20 additions and 1 deletions

View File

@@ -93,7 +93,7 @@ split_embedded_sources(
EMBEDDED Identifiable.swift
EMBEDDED Indices.swift
EMBEDDED InputStream.swift
NORMAL IntegerParsing.swift
EMBEDDED IntegerParsing.swift
EMBEDDED Integers.swift
NORMAL Join.swift
EMBEDDED KeyPath.swift

View File

@@ -0,0 +1,19 @@
// RUN: %target-run-simple-swift(-Osize -swift-version 5 -enable-experimental-feature Embedded -parse-as-library -runtime-compatibility-version none -wmo) | %FileCheck %s
// REQUIRES: swift_in_compiler
// REQUIRES: executable_test
// REQUIRES: optimized_stdlib
// REQUIRES: OS=macosx || OS=linux-gnu
// REQUIRES: swift_feature_Embedded
@main
struct Main {
static func main() {
print(Int("42")!)
// CHECK: 42
print(Int("-123")!)
// CHECK: -123
print(Int("1000", radix: 16)!)
// CHECK: 4096
}
}