Skip to content

Type errors should mention return type if it's provided #825

@oskgo

Description

@oskgo

The following code errors out with unknown variable or constant: `x', which is clearly false. The issue is that there's none with the desired type.

op x: bool.

op y: int = x.

This can be especially confusing when it happens in functions. The following example complains about there being no f with boolean parameter:

op f: bool -> bool.

op y: int = f true.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions