Skip to content

Parsing: introduce @_preInverseGenericsExceptCopyable as an alias attribute#89269

Open
kavon wants to merge 1 commit into
swiftlang:mainfrom
kavon:preinversegenerics-alias
Open

Parsing: introduce @_preInverseGenericsExceptCopyable as an alias attribute#89269
kavon wants to merge 1 commit into
swiftlang:mainfrom
kavon:preinversegenerics-alias

Conversation

@kavon
Copy link
Copy Markdown
Member

@kavon kavon commented May 19, 2026

We need an alias since @_preInverseGenerics(except: ...) has custom parsing that older compilers aren't designed to handle. Only simple decl attributes are parsed correctly by older compilers.

This helps with the introduction of Span<~Escapable>.

related to rdar://176395527

…ttribute

We need an alias since `@_preInverseGenerics(except: ...)` has custom parsing that older
compilers aren't designed to handle. Only simple decl attributes are parsed correctly by
older compilers, so this alias allows you to write this:

```
@_preInverseGenericsExceptCopyable
var x = 0
var x = 0
```

Which all helps with the introduction of Span<~Escapable>.

related to rdar://176395527
@kavon kavon force-pushed the preinversegenerics-alias branch from da91f5e to 14c2574 Compare May 19, 2026 22:13
@kavon
Copy link
Copy Markdown
Member Author

kavon commented May 19, 2026

@swift-ci smoke test

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

Successfully merging this pull request may close these issues.

1 participant