panicinc / icarus

Swift, C, C++, and Objective-C Support for Nova
MIT License
70 stars 5 forks source link

Bug: LSP crashes when calling XCTAssertTrue before completion #17

Closed alicerunsonfedora closed 4 months ago

alicerunsonfedora commented 10 months ago

I noticed that, when writing unit tests using XCTest, the LSP will crash whenever I call XCTAssertTrue before I finish writing the condition:

final class MyTestCase: XCTestCase {
    func testExample() throws {
        XCTAssertTrue(|) // | is my cursor
    }
}

A workaround I've found was writing the condition first and wrapping it in parens, then add XCTAssertTrue before the wrapped expression.

logancollins commented 4 months ago

Unfortunately, a crash in SourceKit-LSP is outside of Icarus' domain. You may wish to file an issue with the SourceKit-LSP project.