FStarLang / FStarLang/FStar

Try error message is in terms of try_with identifier.

Open
#3,373 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
F*
Stars
3.1k
Forks
267
Avg merge
10h 45m
Merged PRs (30d)
54

Description

module ExceptionBadErrorMessage

exception E1
exception E2

let f () =
let n =
(try 1 with
E1 -> 2
| E2 -> 3
| _ -> 4)
in
n
reports
* Error 72 at ExceptionBadErrorMessage.fst(8,2-10,12):
- Identifier not found: [try_with]

1 error was reported (see above)

which is an odd message for what should be core syntax.

Contributor guide

Open the contributing guide

Research direction

Start with the ExceptionBadErrorMessage reproducer in the issue and trace how the try/with syntax reaches the diagnostic that reports the missing [try_with] identifier. Check the compiler's syntax-error handling and existing diagnostic tests, if available. Done means the reproducer no longer reports this misleading identifier error for valid core syntax.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.