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 this being captured by immediately invoked functions #123

Merged
merged 7 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions shared/src/main/scala/mlscript/codegen/Scope.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,6 @@ class Scope(name: Str, enclosing: Opt[Scope]) {
}
}

/**
* Shorthands for creating function scopes.
*/
def this(name: Str, params: Ls[Str], enclosing: Scope) = {
this(name, Opt(enclosing))
params foreach { param =>
declareValue(param)
}
}

chengluyu marked this conversation as resolved.
Show resolved Hide resolved
private val allocateRuntimeNameIter = for {
i <- (1 to Int.MaxValue).iterator
c <- Scope.nameAlphabet.combinations(i)
Expand Down
1 change: 1 addition & 0 deletions shared/src/test/diff/mlscript/TypeClasses.mls
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

class Monoid[A]
method Empty: A
method Add: A -> A -> A
Expand Down