Skip to content

Commit

Permalink
TypeChecker (unittests)
Browse files Browse the repository at this point in the history
- Check the variable is equal to the one we are looking for (`j`)
  • Loading branch information
deavmi committed Nov 5, 2023
1 parent 89ad16e commit 54ce4be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/tlang/compiler/typecheck/core.d
Original file line number Diff line number Diff line change
Expand Up @@ -3683,6 +3683,7 @@ unittest
*/
Variable[] unusedVars = tc.getUnusedVariables();
assert(unusedVars.length == 1);
Variable jVar = unusedVars[0];
// TODO: Add check for `j` named variable here
Variable unusedVarActual = unusedVars[0];
Variable unusedVarExpected = cast(Variable)tc.getResolver().resolveBest(tc.getModule(), "j");
assert(unusedVarActual is unusedVarExpected);
}

0 comments on commit 54ce4be

Please sign in to comment.