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

mal_parser: cannot refer to types containing an underscore #6224

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

mal_parser: cannot refer to types containing an underscore #6224

monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2017-02-21 21:55:20 +0100
From: Dean De Leo <>
To: MonetDB5 devs <>
Version: 11.25.5 (Dec2016-SP1)
CC: @mlkersten

Last updated: 2017-03-03 10:24:09 +0100

Comment 25047

Date: 2017-02-21 21:55:20 +0100
From: Dean De Leo <>

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Build Identifier:

It is currently possible to create types having as part of their name underscores, e.g. "my_type". However apparently it is not possible to refer to them in the function signatures.

Reproducible: Always

Steps to Reproduce:

See attached repro

Actual Results:

The parser raises the error "Type identifier expected" when encountering a type with an underscore as part of a function signature.

Expected Results:

Either the function signature should be accepted or the character _ is considered illegal when defining a new type (atom).

Comment 25048

Date: 2017-02-21 21:55:45 +0100
From: Dean De Leo <>

Created attachment 536
repro.mal

Attached file: repro.mal (application/octet-stream, 232 bytes)
Description: repro.mal

Comment 25049

Date: 2017-02-21 22:02:45 +0100
From: @mlkersten

Type identifiers indeed can not contain the '_', because it separates the name from its index. It is reserved for type variables, which aids type resolution
e.g.

function f(a:any_1, b:any):any_1

tells that the result type is the same as the first argument.
The type for 'b' can be anything.

Comment 25050

Date: 2017-02-21 22:09:01 +0100
From: Dean De Leo <>

sure, but then how do you refer to such types? since they can be created.. :)

Comment 25051

Date: 2017-02-21 22:11:12 +0100
From: @mlkersten

For the time being don't create them.
Once MAL itself is revisited for a clean up, this might be one of the issues
looked into. There is indeed some old cruft.

Comment 25056

Date: 2017-02-24 10:33:46 +0100
From: @mlkersten

A fix has been checked in and the test added

Comment 25107

Date: 2017-03-03 10:24:09 +0100
From: @sjoerdmullender

Dec2016-SP2 has been released, incorporating the fix.

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

Successfully merging a pull request may close this issue.

None yet
1 participant