Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String.count -> UInt8 link fail #56

Open
mredig opened this issue Aug 23, 2024 · 1 comment
Open

String.count -> UInt8 link fail #56

mredig opened this issue Aug 23, 2024 · 1 comment

Comments

@mredig
Copy link
Contributor

mredig commented Aug 23, 2024

So far, the following sample code has failed in two separate projects for me:

let a = "asdf".count
let b = UInt8(a)

Compilation appears to succeed, but fail on the linking step. Let me know if you need more to go on.

Oh - working with espidf and compiling to an esp32c3, if any of that matters.

@rauhul
Copy link
Collaborator

rauhul commented Oct 11, 2024

Is this still an issue with new toolchains? I was not able to reproduce any issues with the above snippet:

➜  Desktop cat foo.swift
let a = "asdf".count
let b = UInt8(a)
➜  Desktop swiftc foo.swift -emit-object -o foo.o -enable-experimental-feature Embedded -wmo -target armv7em-apple-none-macho -Xcc -D__APPLE__ -Xcc -D__MACH__
➜  Desktop swiftc --version
Apple Swift version 6.1-dev (LLVM 89ccf4b8a46135a, Swift 6a5ae8d5df144dd)
Target: arm64-apple-macosx15.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants