Open
Description
Swift version
swiftlang-6.0.0.6.8
Platform
macOS 14.6.1
Editor
VSCode
Does the issue reproduce with Swift 6?
Yes
Description
In the example below, the type of a
is main.Int
and the type of b
is Swift.Int
. LSP seems to ignore that the using the unqualified Int
is ambiguous in this context.
class Int {}
let a = Int()
let b = 1 + 1
Steps to Reproduce
In VSCode, type hints provided by SK-LSP show the same type for both variables. When double clicking the type hint, the inserted type is ambiguous. A similar issue appears when invoking the extract expression refactoring. When we try to extract 1 + 1
, the generated code looks like let extractedExpr: Int = 1 + 1
.
Logging
No response