Navigation Menu

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-12617] Shorthand syntax doesn't work in some instances. #55061

Closed
swift-ci opened this issue Apr 18, 2020 · 2 comments
Closed

[SR-12617] Shorthand syntax doesn't work in some instances. #55061

swift-ci opened this issue Apr 18, 2020 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-12617
Radar rdar://problem/62894483
Original Reporter davidde_94 (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

Xcode 11.4.1 (11E503a)

Apple Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29)

Target: x86_64-apple-darwin19.4.0

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee davidde_94 (JIRA)
Priority Medium

md5: 57fd135bd20ffe35a6ff9f1b2206325f

Issue Description:

Attempting to compile the code:

"test ".trimmingCharacters(in: .alphanumerics.inverted)

does not compile. The fatal error states "Cannot infer contextual base in reference to member 'alphanumerics'"

Instead I am required to enter:

"test ".trimmingCharacters(in: CharacterSet.alphanumerics.inverted)
@beccadax
Copy link
Contributor

beccadax commented May 5, 2020

@swift-ci create

@xedin
Copy link
Member

xedin commented Mar 29, 2021

Looks like this has been fixed on main:

import Foundation
"test ".trimmingCharacters(in: .alphanumerics.inverted)

This snippet type-checks just fine. davidde_94 (JIRA User) Please use the latest snapshot of main branch to verify and close.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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
Projects
None yet
Development

No branches or pull requests

3 participants