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

False positive for FIND of a specific module in a block #1708

Open
rebolbot opened this issue Oct 21, 2010 · 4 comments
Open

False positive for FIND of a specific module in a block #1708

rebolbot opened this issue Oct 21, 2010 · 4 comments
Labels

Comments

@rebolbot
Copy link
Collaborator

Submitted by: BrianH

If you attempt to FIND a specific module in a block, it will find the first module in the block, not the specific module you are looking for. This is almost always a false positive. It should return the same module it is looking for (not an "equal" one, the same one).

This currently breaks IMPORT of premade module! values, and DO of modules. I can add a workaround to the source for now.

>> find system/modules module [] []
== [make module! [
        lib-base: handle!
        xtest: make function! [[][
            foreach blk [
                [xarg0]
                [xarg1 111]
                [xarg1 1.1]
                [xarg1 "test"]
                [xarg1 [1 2 3]]
                [xarg1 10-Sep-2010]
                [xarg2 111 222]
                [xword0]
                [xword1 "system"]
                [xobj1 system 'version]
                [calls lib 'negate]
                [calls lib 'sine]
                [...
; Should return none, since a freshly made module! would not be there yet.

CC - Data [ Version: alpha 107 Type: Bug Platform: All Category: Native Reproduce: Always Fixed-in:alpha 110 ]

@rebolbot
Copy link
Collaborator Author

Submitted by: BrianH

If this ticket is dismissed (semantics of FIND changing and all that), at least the workaround code works. I'm not pushing for this either way.

@rebolbot
Copy link
Collaborator Author

Submitted by: BrianH

See #1720 for an alternative suggestion.

@rebolbot
Copy link
Collaborator Author

Submitted by: Carl

That's bizarre. Trying some tests on it. For now, assume it is fixed and don't work around it.

@rebolbot
Copy link
Collaborator Author

Submitted by: BrianH

Note: It doesn't even test equivalence - any module will do. I will comment out the workaround code when FIND is verified to work (wrote it already days ago).

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

No branches or pull requests

1 participant