Skip to content

Commit

Permalink
Detect scope violations.
Browse files Browse the repository at this point in the history
  • Loading branch information
athas committed Jan 3, 2025
1 parent 956653e commit 6503e99
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Language/Futhark/TypeChecker/Constraints.hs
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,8 @@ scopeCheck reason v v_lvl ty = do
case ty_v_info of
Just (Right (TyVarParam ty_v_lvl _ _))
| ty_v_lvl > v_lvl -> scopeViolation reason v ty ty_v
Just (Right (TyVarSol ty')) ->
mapM_ check $ typeVars ty'
_ -> pure ()

-- If a type variable has a liftedness constraint, we propagate that
Expand Down

0 comments on commit 6503e99

Please sign in to comment.