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

Fix AS210 error where expressions are never null #45

Merged
merged 3 commits into from
Nov 11, 2023

Conversation

jonathannorris
Copy link
Contributor

After updating to the latest version of Assemblyscript 0.20.1, we ran into a couple of small type errors:

INFO AS210: Expression is never 'null'.

       return matchStr != null ? new Match([matchStr!], 0, str) : null;
                                            ~~~~~~~~
 in ~lib/assemblyscript-regex/assembly/regexp.ts(162,44)

INFO AS210: Expression is never 'null'.

           [matchStr!].concat(lastCapturesForGroup(groupMarkers)),
            ~~~~~~~~
 in ~lib/assemblyscript-regex/assembly/regexp.ts(186,12)

INFO AS210: Expression is never 'null'.

       return matchStr != null ? new Match([matchStr!], 0, str) : null;
                                            ~~~~~~~~
 in ~lib/assemblyscript-regex/assembly/regexp.ts(162,44)

INFO AS210: Expression is never 'null'.

           [matchStr!].concat(lastCapturesForGroup(groupMarkers)),
            ~~~~~~~~
 in ~lib/assemblyscript-regex/assembly/regexp.ts(186,12)

Ended up being very minor fixes, let me know if you need any further details.

@ColinEberhardt
Copy link
Owner

@jonathannorris apologies, I missed this pull request when it was initially opened. Are you still happy with this fix and think it should be merged? If so, I'll review and merge.

@jonathannorris
Copy link
Contributor Author

Hey @ColinEberhardt yes I believe it should be merged.

@ColinEberhardt ColinEberhardt merged commit c9e1d77 into ColinEberhardt:main Nov 11, 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

2 participants