mirror of
https://github.com/enso-org/enso.git
synced 2024-11-27 17:13:07 +03:00
Fix REPL runner (#3624)
`main` method is now special because it is trully static i.e. no implicit `self` is being generated for it. But since REPL's `main` isn't called `main` its invocation was missing an argument. Follow up on https://github.com/enso-org/enso/pull/3569 # Important Notes Will work on adding a CI test for REPL to avoid problems with REPL in a follow up PR.
This commit is contained in:
parent
42dbd8bb59
commit
1eec315ce1
@ -756,7 +756,10 @@ object Main {
|
||||
val mainCons = mainModule.getAssociatedConstructor
|
||||
val mainFun = mainModule.getMethod(mainCons, mainMethodName)
|
||||
mainFun match {
|
||||
case Some(main) => main.execute()
|
||||
case Some(main) if mainMethodName != "main" =>
|
||||
main.execute(mainCons.newInstance())
|
||||
case Some(main) =>
|
||||
main.execute()
|
||||
case None =>
|
||||
err.println(
|
||||
s"The module ${mainModule.getName} does not contain a `main` " +
|
||||
|
Loading…
Reference in New Issue
Block a user