Skip to content

Commit

Permalink
Resolver (unittests)
Browse files Browse the repository at this point in the history
- Added more unittests to cover last set of erroneous cases
  • Loading branch information
deavmi committed May 12, 2024
1 parent aaaea9b commit 797a4b0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions source/tlang/compiler/typecheck/resolution.d
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,23 @@ int g;
assert(false);
}
catch(ResolutionError e) {}

// Try to find something within the module which doesn't exist
try
{
tc.getResolver().resolveWithin_Safe(modulle, "a", Variable.classinfo);
assert(false);
}
catch(ResolutionError e) {}

// Try to find something starting at the module-level which doesn't
// exist
try
{
tc.getResolver().resolveBest_Safe(modulle, "a", Variable.classinfo);
assert(false);
}
catch(ResolutionError e) {}
}
catch(TError e)
{
Expand Down

0 comments on commit 797a4b0

Please sign in to comment.