Accessing x.Type
forces x
to be considered a type name
#78988
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
There's no actual problem here and I claim that in this context the compiler need not force
Type
to be treated as a keyword. It should look up the base nameIR
first and see that it's a module. If you disagree, then at least the error message can be improved.Reproduction
Expected behavior
Compile without error or at least give a better error message. I spent an hour scratching my head before the workaround occurred to me.
Environment
swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx15.0
Additional information
No response
The text was updated successfully, but these errors were encountered: