Programming Language Theory Flashcard
Why does type inference cause vague error messages?
Books
Concepts
Deckcompiler implementation
Question
Why does type inference cause vague error messages?
Answer
Sometimes, multiple types are inferred for a variable at different locations. The question: Which type and which location to report?
Example:
can be a boolean, if so, must report error at in the then branch .
can be a number, if so, must report error at in the condition.