Disallow block parameters on extern forever#1254
Conversation
|
We should also change the source and core representation. However, it would be good to do this after merging #1219 |
|
Note that there are specific use cases for external block parameters:
That is why I fixed the captures for them in #448 . |
|
Otherwise, is there a reason they won't be supported? Apart from having to pass them through? |
| def transform(extern: core.Extern)(using BlocksParamsContext, ErrorReporter): Declaration = extern match { | ||
| case core.Extern.Def(name, tps, cparams, vparams, bparams, ret, capture, body) => | ||
| if bparams.nonEmpty then ErrorReporter.abort("Foreign functions currently cannot take block arguments.") | ||
| if bparams.nonEmpty then ErrorReporter.abort("Foreign functions cannot take block arguments.") |
There was a problem hiding this comment.
Given that this error message will only show up on LLVM (i.e. machine-based backends), maybe we'd want to specify this in the error message?
|
We can also just support it, if you tell me what the semantics should be. |
|
@phischu I would assume that the block parameters are also passed as parameters (of type |
|
Beware, this will probably be subsumed by #1298 |
Previously there was an error message stating that block parameters are currently not supported, but they most probably never will be (@phischu)