Skip to content

[SR-7445] Call Expressions Need Better Assignment Diagnostics #49988

@CodaFi

Description

@CodaFi
Previous ID SR-7445
Radar None
Original Reporter @CodaFi
Type Improvement
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, DiagnosticsQoI, StarterBug
Assignee @AnthonyLatsis
Priority Medium

md5: d9d262db67912b2400f15a80852abcb8

Issue Description:

Call expressions are not handled in the walker at ConstraintSystem::diagnoseAssignmentFailure in CSDiag.cpp. A new diagnostic needs to be added to DiagnosticsSema.def and it needs to be invoked by that function. It would also be great to clean up the existing diagnostics by giving them better messages.

print(1) = () // error: cannot assign to value: function call returns immutable value 

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions