WhileyCompiler icon indicating copy to clipboard operation
WhileyCompiler copied to clipboard

Separate out Check for Branch Always Taken

Open DavePearce opened this issue 6 years ago • 0 comments

At the moment, the branch always taken check is embedded within FlowTypeCheck. This actually causes problems because it results in errors being raise prematurely. For example, consider this:

method main():
    int|null x = null

    while x is null:
        x = 1

This generates the error even though its not actually true. The problem is that we need to really get the full type for x at that point before reporting the error.

DavePearce avatar Sep 05 '19 05:09 DavePearce