swiftlang/swift
Ver no GitHubMissing fixits for missing @dynamicMemberLookup impl
Open
#83.344 aberto em 25 de jul. de 2025
@dynamicMemberLookupattributesbugcompilerdiagnostics qualityfix-itsgood first issueswift 6.2type checker
Métricas do repositório
- Stars
- (69.989 stars)
- Métricas de merge de PR
- (Mesclagem média 7d 6h) (556 fundiu PRs em 30d)
Description
Description
if you haven't implemented the dynamic member lookup requirements the compiler emits an error without fixits:
test.swift:1:1: error: '@dynamicMemberLookup' requires 'Test' to have a 'subscript(dynamicMember:)' method that accepts either 'ExpressibleByStringLiteral' or a key path
1 | @dynamicMemberLookup
| `- error: '@dynamicMemberLookup' requires 'Test' to have a 'subscript(dynamicMember:)' method that accepts either 'ExpressibleByStringLiteral' or a key path
2 | struct Test {}
3 |
Reproduction
@dynamicMemberLookup
struct Test {}
Expected behavior
fixits with error message
Environment
Apple Swift version 6.2 (swiftlang-6.2.0.13.10 clang-1700.3.13.4) Target: arm64-apple-macosx26.0
Additional information
No response