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

Limit type alias declarations and import statements in Source Typed to top level #1369

Conversation

zhaojj2209
Copy link
Contributor

Adds a check that throws an error if type alias declarations are found in block statements and not programs (top level), to be in line with Source Typed specifications.

Also fixes Source Typed parser such that syntax errors related to import statements can be caught.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4354171237

  • 28 of 32 (87.5%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 83.667%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/typeChecker/typeErrorChecker.ts 21 25 84.0%
Totals Coverage Status
Change from base Build 4310629732: 0.05%
Covered Lines: 10135
Relevant Lines: 11765

💛 - Coveralls

@zhaojj2209 zhaojj2209 requested a review from ianyong March 7, 2023 12:48
Copy link
Member

@martin-henz martin-henz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@martin-henz martin-henz merged commit 4aaaeaf into source-academy:master Mar 8, 2023
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

Successfully merging this pull request may close these issues.

None yet

4 participants