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

Implicit typing not taken into account by #176

Open
dorchard opened this issue Aug 31, 2021 · 1 comment
Open

Implicit typing not taken into account by #176

dorchard opened this issue Aug 31, 2021 · 1 comment

Comments

@dorchard
Copy link
Member

Given the following implicit.f:

       PROGRAM IMPLICIT
       IX = 0
       IY = 0
       END

then fortran-src -t implicit.f cannot calculate any types, but this should be inferring via the implicit types scheme. (We should also check fortran-vars behaviour on this).

@raehik
Copy link
Collaborator

raehik commented Sep 1, 2021

We could add an entry to the TypeEnv whenever we find an assignment to a variable that isn't yet defined and matches an implicit typing rule.
If we have some support for implicit typing, it would be nice to process IMPLICIT statements also, and expose options similar to compilers for applying IMPLICIT NONE by default (gfortran's -fimplicit-none). I'm not immediately sure how to implement scoping though. Maybe bolt a reader monad on top of the infer state, that follows scoping unit rules?

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

No branches or pull requests

2 participants