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

Excess values in #[..] construct on input do not give error, except for date #1034

Closed
Siskin-Bot opened this issue Feb 15, 2020 · 1 comment
Labels
Oldes.resolved Bugs/wishes with Oldes' fixes/features Test.written Type.bug

Comments

@Siskin-Bot
Copy link
Collaborator

Submitted by: meijeru

Apparently, after the required values (which sometimes can vary in number) one can add any number of values that are not checked or taken into account. Exception: #[date! ...] is critical.

>> #[decimal! 1]
== 1.0
>> #[decimal! 1 2 3 4 5]
== 1.0
>> #[image! 1x1 #{000000} #{00}]
== make image! [1x1 #{000000} #{00}]
>> #[image! 1x1 #{000000} a b c]
== make image! [1x1 #{000000}] ; a b c plainly ignored, even though a is in the place where a binary! value could be expected
>> #[date! 1 2 3 4:0 5:0]
== 1-Feb-0003/4:00+5:00
>> #[date! 1 2 3 4:0 5:0 6]
** Error

Imported from: CureCode [ Version: alpha 65 Type: Bug Platform: All Category: n/a Reproduce: Always Fixed-in:none ]
Imported from: metaeducation#1034

Comments:

Rebolbot commented on Jul 1, 2009:

Submitted by: BrianH

This bug is more critical than it sounds: If we don't throw an error for extra stuff in the serialized expression, that extra stuff can block us in the future if we need to add more legitimate parameters. Screening for that makes us more future-proof.


Rebolbot mentioned this issue on Jan 12, 2016:
LOAD and MAKE of image! ignore series index


Rebolbot added the Type.bug on Jan 12, 2016


@Oldes
Copy link
Owner

Oldes commented Jul 16, 2020

I consider it partially resolved as I was not going thru all construction types... just here mentioned decimal!, image! and any-string!.. it now throws an error like:

>> #[file! "aa" 2 x]
** Syntax error: invalid construction spec: [file! "aa" 2 x]

@Oldes Oldes closed this as completed Jul 16, 2020
Oldes added a commit to Oldes/Rebol3 that referenced this issue Jul 16, 2020
Oldes added a commit to Oldes/Rebol3 that referenced this issue Jul 16, 2020
Oldes added a commit to Oldes/Rebol3 that referenced this issue Jul 16, 2020
Oldes added a commit to Oldes/Rebol3 that referenced this issue Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Oldes.resolved Bugs/wishes with Oldes' fixes/features Test.written Type.bug
Projects
None yet
Development

No branches or pull requests

2 participants