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 checker correction for "while true" loops #210

Closed
joey-coleman opened this issue Nov 22, 2013 · 1 comment
Closed

Type checker correction for "while true" loops #210

joey-coleman opened this issue Nov 22, 2013 · 1 comment
Assignees
Labels
duplicate Mergable A fix is available on a branch to merge for release
Milestone

Comments

@joey-coleman
Copy link
Member

The following bug was originally reported on Sourceforge by nick_battle, 2013-11-20 07:48:20.119000:

The type checker had a fault where infinite while loops were not treated as such. For example, the following operation:

op: set of Event ==> Event
op(events) ==
    while true do
        for all e in set events do
            if e.isSignalled()
            then return e;

This raised an error, saying the operation returns "() | Event", since the loop was considered to terminate. The fix looks explicitly for "while true" loops like this, and so this now returns just "Event", as the signature requires.

@joey-coleman joey-coleman reopened this Nov 22, 2013
@joey-coleman joey-coleman reopened this Nov 25, 2013
@ghost ghost self-assigned this Dec 2, 2013
@ghost ghost assigned nickbattle Jan 2, 2014
@nickbattle
Copy link
Contributor

Changes migrated into ncb/development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Mergable A fix is available on a branch to merge for release
Projects
None yet
Development

No branches or pull requests

2 participants