Skip to content

[SR-3350] Constraint solver may return "Solved" even when the solution contains ErrorType #45938

@benlangmuir

Description

@benlangmuir
Previous ID SR-3350
Radar None
Original Reporter @benlangmuir
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, TypeChecker
Assignee None
Priority Medium

md5: 6c8887670e6b4267fda881d7fabbb358

Issue Description:

For example, in the following code-completion:

func c{case
let a#^A^#}

We will try to solve an unresolved_pattern expression, which CSGen will mark as ErrorType. The solver then returns this as a solution. Either the solver should notice the ErrorType and return Error, or the code outside the solver should be adapted to ensure that we don't blow up in applySolution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselftype checkerArea → compiler: Semantic analysis

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions