-
Notifications
You must be signed in to change notification settings - Fork 7
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
No polymorphic closures #904
Comments
The spec says that a |
No - but nesting is purely for namespacing/scoping (a "local" funcdefn can only have nonlocal edges to things within the same parent). A local funcdefn already cannot refer to any enclosing TypeParams, this is checked in validation. |
* Type::Function now stores only a FunctionType, not a PolyFuncType * PolyFuncType remains, for OpDef's and FuncDefn/Decl's * EdgeKind::Static now replaced by EdgeKind::Const (a type) EdgeKind::Static (a PolyFuncType) * Remove LeafOp::TypeApply, repurpose validation code onto Call * Thus, progressively remove all `impl Substitution`s except for `struct SubstValues`, which can become Substitution * Update spec, introducing "Static" and "Dataflow" edge kinds as broader classes of the other edge kinds, and polymorphic "type schemes" vs monomorphic "Function types". * Update serialization schema and add roundtrip test of a Noop operating on a value of function type fixes #904 This should enable resolving #788 and related capture/closure issues if we forbid edges into a FuncDefn from outside (@doug-q) BREAKING CHANGE: EdgeKind::{Static -> Const}, add new EdgeKind::Function, Type contains only monomorphic functions, remove TypeApply.
Type
hierarchy includes monomorphic function types only, not polymorphic ones.EdgeKind
s: one for values/closures (from Consts to their uses, including CallIndirect), i.e. no polymorphism; and one for functions (carries a polymorphic function type from a FuncDecl/Defn to a Call, only).TypeApply
, butCall
does type application, as per fix: polymorphic calls #901The text was updated successfully, but these errors were encountered: