Skip to content

Better error reporting for malformed literals #818

@yav

Description

@yav

The problem is illustrated by this example:

Cryptol> 0b12

[error] at <interactive>:1:1--1:4:
  Type mismatch:
    Expected type: Integer -> ?it`945
    Inferred type: [1]
  where
  ?it`945 is the type of '(expression)' at <interactive>:1:1--1:5

We could probably solve it by allowing more digits in the lexer's regexp, but doing a validation after and reporting
and error if malformed digits are found.

Metadata

Metadata

Assignees

Labels

UXIssues related to the user experience (e.g., improved error messages)parserIssues with lexing or parsing.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions