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

[SR-10925] Opaque result types cannot be used within a module on macOS 10.14 #53316

Open
lilyball mannequin opened this issue Jun 13, 2019 · 1 comment
Open

[SR-10925] Opaque result types cannot be used within a module on macOS 10.14 #53316

lilyball mannequin opened this issue Jun 13, 2019 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself opaque types Feature → types: opaque types

Comments

@lilyball
Copy link
Mannequin

lilyball mannequin commented Jun 13, 2019

Previous ID SR-10925
Radar None
Original Reporter @lilyball
Type Bug
Environment

Apple Swift version 5.1 (swiftlang-1100.0.38.29 clang-1100.0.20.14)
Target: x86_64-apple-darwin18.6.0

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, OpaqueResultTypes
Assignee None
Priority Medium

md5: 690da11ff8b42be636f66001942f1178

Issue Description:

Opaque result types are resilient types, but this should only matter when crossing a module boundary. When declaring and using opaque result types within a single module, this should work on all OSes as it should be a compile-time-only feature in this scenario.

Unfortunately, when I actually try this, I get a linker error.

func foo() -> some CustomStringConvertible {
    return 42
}
print(foo())
dyld: lazy symbol binding failed: Symbol not found: _swift_getOpaqueTypeMetadata
  Referenced from: /tmp/foo
  Expected in: /usr/lib/swift/libswiftCore.dylib

dyld: Symbol not found: _swift_getOpaqueTypeMetadata
  Referenced from: /tmp/foo
  Expected in: /usr/lib/swift/libswiftCore.dylib
@belkadan
Copy link
Contributor

cc @jckarter

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself opaque types Feature → types: opaque types
Projects
None yet
Development

No branches or pull requests

1 participant