-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: check whether type parameter bounds are acyclic (#886)
Closes #874 ### Summary of Changes Add a check to ensure type parameter bounds are acyclic.
- Loading branch information
1 parent
2fc7fe6
commit bcf1a4b
Showing
12 changed files
with
332 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Type } from '../../src/language/typing/model.js'; | ||
import { AssertionError } from 'assert'; | ||
|
||
export const expectEqualTypes = (actual: Type, expected: Type) => { | ||
if (!actual.equals(expected)) { | ||
throw new AssertionError({ | ||
message: `Expected type '${actual.toString()}' to equal type '${expected.toString()}'.`, | ||
actual: actual.toString(), | ||
expected: expected.toString(), | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.