Skip to content

Commit

Permalink
[Mojo] Emit error when parametric function is passed as argument (#31…
Browse files Browse the repository at this point in the history
…044)

This is never legal, so the parser should catch it. The patch also
changes an assert in the parser that could get triggered if a parametric
function is passed as an argument: if the argument is called inside a
closure, the parser would crash because closure bodies are resolved even
if the parent function had a decl resolution error. From now on, this
assert will just turn into a suppressed error if and only if the a
parent func had a resolution error.

Closes [Internal Link]

modular-orig-commit: b1065e081f805239fb668ae014e46f86e71e7025
  • Loading branch information
laszlokindrat authored Feb 6, 2024
1 parent 8a60cb7 commit a2020a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ for x in v:
[#1230](https://github.com/modularml/mojo/issues/1230),
[#1699](https://github.com/modularml/mojo/issues/1699),
[#1708](https://github.com/modularml/mojo/issues/1708)
- [#1223](https://github.com/modularml/mojo/issues/1223) - Crash when parametric
function is passed as (runtime) argument. The parser now errors out instead.

## v0.7.0 (2024-01-25)

Expand Down

0 comments on commit a2020a6

Please sign in to comment.