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
❯ scala-cli repl --scala 3.1.3-RC5Welcome to Scala3.1.3-RC5 (1.8.0_302, JavaOpenJDK64-BitServerVM).
Type in expressions for evaluation. Ortry:help.
scala>abstractclassFoo(valinternal:String)
// defined class Foo
scala>classFooImpl(internal: String) extendsFoo(internal)
// defined class FooImpl
scala>valfoo=FooImpl("symbol")
valfoo:FooImpl=FooImpl@5a05dd30
Output
scala> foo.
!=->asInstanceOf eq formatted hashCode ne notify synchronized wait
##== ensuring equals getClass isInstanceOf nn notifyAll toString →
Expectation
internal field should be completed.
Additional notes
It works if...
The underlying abstract class's field and concrete class's constructor parameter name differs.
scala>abstractclassFoo(valinternal:String)
// defined class Foo
scala>classFooImpl(foo: String) extendsFoo(foo)
// defined class FooImpl
scala>valfoo=FooImpl("symbol")
valfoo:FooImpl=FooImpl@602af851
scala> foo.
!=->asInstanceOf eq formatted hashCode isInstanceOf nn notifyAll toString →##== ensuring equals getClass internal ne notify synchronized wait
Use case
I found this problem when I play around with SymDenotation in lampepfl/dotty.
Compiler version
3.1.3-RC5
Minimized code
Output
Expectation
internal
field should be completed.Additional notes
It works if...
The underlying abstract class's field and concrete class's constructor parameter name differs.
Use case
I found this problem when I play around with
SymDenotation
inlampepfl/dotty
.https://github.com/lampepfl/dotty/blob/741587d8e1c0238ca9c0986a77519cdf5a6f2fa8/compiler/src/dotty/tools/dotc/core/Denotations.scala#L178-L180
https://github.com/lampepfl/dotty/blob/741587d8e1c0238ca9c0986a77519cdf5a6f2fa8/compiler/src/dotty/tools/dotc/core/SymDenotations.scala#L31-L40
We can't complete
symbol
field onSymDenotation
.The text was updated successfully, but these errors were encountered: