Skip to content

Improve error reporting: Trying to pass arguments to a simple value gives confusing error. #5476

@isaacabraham

Description

@isaacabraham

What

This code leads to the following error:

let x = 5
x 10
^
error FS0003: This value is not a function and cannot be applied.

Why

Beginners to the language try to read this error and 9/10 times don't understand what it means.

How

Consider replacing the error message with something like:

"x" is a simple value of type "int", and not a function. It does not take in any arguments, but you are trying to pass the value "10" as an argument to it.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

New

Relationships

None yet

Development

No branches or pull requests

Issue actions