You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This task is automatically imported from the old Task Issue Board and it was originally created by Pavel Marek.
Original issue is here.
Output of:
type MyType
Value number
foo self = self.number
foo = "static method"
main =
my_type = MyType.Value 42
IO.println my_type.foo
IO.println MyType.foo
should be:
42
"static method"
but instead is:
In module tmp:
Compiler encountered errors:
tmp.enso[82:5-82:23]: Method overloads are not supported: MyType.foo is defined multiple times in this module.
Aborting due to 1 errors and 0 warnings.
Execution finished with an error: Compilation aborted due to errors.
I just tested the latest build and this again yields:
In module statics123:
Compiler encountered errors:
statics123.enso[6:5-6:25]: Method overloads are not supported: MyType.foo is defined multiple times in this module.
Aborting due to 1 errors and 0 warnings.
Execution finished with an error: Compilation aborted due to errors.
at <java> org.graalvm.sdk/org.graalvm.polyglot.Value.invokeMember(Value.java:971)
at <java> org.enso.polyglot.Module.getAssociatedType(Module.scala:19)
at <java> org.enso.runner.Main$.runMain(Main.scala:787)
at <java> org.enso.runner.Main$.runSingleFile(Main.scala:719)
at <java> org.enso.runner.Main$.run(Main.scala:601)
at <java> org.enso.runner.Main$.main(Main.scala:1095)
at <java> org.enso.runner.Main.main(Main.scala)
I have ventured here as part of my research for #8805.
I think it may be worth re-opening this ticket with low(ish) priority in order to at least improve the error message:
instead of the generic Method overloads are not supported: MyType.foo is defined multiple times in this module.
maybe we should do Cannot define both a static and member method with the same name: My_Type.foo.?
This task is automatically imported from the old Task Issue Board and it was originally created by Pavel Marek.
Original issue is here.
Output of:
should be:
but instead is:
More info in https://discord.com/channels/401396655599124480/1055483105718304818
This blocks implementation of equality on types. Meaning that
MyType == MyType
won't work, because it dispatches to an instance methodAny.==
.Probable cause is #3764
See also https://github.com/enso-org/enso/pull/3956/files/4ff2e40131a037a89e5a60dda872721c5f9caa51#r1053010361
The text was updated successfully, but these errors were encountered: