Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type unions don't display well in error messages #1633

Open
cgay opened this issue Nov 22, 2024 · 0 comments
Open

Type unions don't display well in error messages #1633

cgay opened this issue Nov 22, 2024 · 0 comments

Comments

@cgay
Copy link
Member

cgay commented Nov 22, 2024

sources/dfmc/reader/lexer.dylan:880.10-64: Serious warning - 
Invalid type for argument string-or-character in call to 
whitespace? (string-or-character :: <string-or-char>) => (whitespace? :: <boolean>): 
 <simple-byte-vector> supplied, {model-object :: <union>} expected.
               ------------------------------------------------------
          if (~whitespace?(contents, start: bpos, end: first-newline))
               ------------------------------------------------------

The {model-object :: <union>} in that message is defined in the strings library like this:

define constant <string-or-char> = type-union(<string>, <character>);

So it should probably say "... type-union(<string>, <character>) expected."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant