simple selector for export should make a forwarder for its setter #17903
Replies: 0 comments 3 replies
-
The problem with exporting the setter automatically is now if you define an overload of class A:
var varInt: Int = 1
def varInt_= : Unit = println("ok") // unrelated overload of setter for `varInt`
class B:
val a = new A
export a.varInt // exports `varInt`, `varInt_=(x$1: Int)`
export a.varInt_= // exports `varInt_=(x$1: Int)`, `varInt_=`, causing a double definition
varInt = 2 |
Beta Was this translation helpful? Give feedback.
-
I will move this to feature requests because the present behaviour is as specified. deferring to section 4.2 of the Scala language specification, a Additionally, as specified at http://dotty.epfl.ch/docs/reference/other-new-features/export.html a simple selector, such as in |
Beta Was this translation helpful? Give feedback.
-
This feature request would bring |
Beta Was this translation helpful? Give feedback.
-
Minimized code
However
Beta Was this translation helpful? Give feedback.
All reactions