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
[info] compiling 2Scala sources to /Users/rssh/work/oss/dotty-bug1/jvm/target/scala-3.0.0-M2/classes ...
[error] --Error:/Users/rssh/work/oss/dotty-bug1/shared/src/main/scala/gopher/Channel.scala:21:6
[error] 21|traitIOChannel[F[_]:CpsAsyncMonad,I,O] extendsIChannel[F,I] withOChannel[F,O]
[error] |^
[error] |traitIOChannel inherits conflicting members:
[error] | method inline$evidence$1 in traitIChannel of type=> gopher.CpsAsyncMonad[F] and
[error] | method inline$evidence$1 in traitOChannel of type=> gopher.CpsAsyncMonad[F]
[error] |(Note:this can be resolved by declaring an override in traitIOChannel.)
[error] one error found
[error] (gopherJVM /Compile/ compileIncremental) Compilation failed
Expectation
should compile.
Note, that if I put all definitions in one file -- compilation is successful.
The text was updated successfully, but these errors were encountered:
traitA:privatedeff:Int=1inlinedefg= f
traitB:privatedeff:Int=1inlinedefh= f
classCextendsA, B
gives:
-- Error: i10477.scala:7:6 -----------------------------------------------------
7 |class C extends A, B
| ^
| class C inherits conflicting members:
| method inline$f in trait A of type => Int and
| method inline$f in trait B of type => Int
| (Note: this can be resolved by declaring an override in class C.)
1 error found
The problem is that the names of inline accessors are generated from the name of the private definition they access.
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 25, 2021
Minimized code
File 1:
File 2:
Output
Expectation
should compile.
Note, that if I put all definitions in one file -- compilation is successful.
The text was updated successfully, but these errors were encountered: