New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message "error: type _$1 is defined twice" when compiled the second time #5240
Comments
Imported From: https://issues.scala-lang.org/browse/SI-5240?orig=1
|
@paulp said: |
krzku said: I have find a way around the bug but it might also be useful for finding it. The statement that causes the bug is as follows (it is present in package object). var labels: Array[_ <: org.jacop.core.Var] = null The error is also reported when I use a full version of the existential type (wildcard above). Defining the type separately as written below does not give an error (this is my way around9. type DFS = DepthFirstSearch[_ <: org.jacop.core.Var] The bug happens only if the first statement is defined in package object and after the first compilation (when class files already exist). It is not reported for the first compilation when there is no class files yet. Hope it can help. /Kris |
@axel22 said: |
@dcsobral said: |
@paulp said: |
I have a project in java (JaCoP http://sourceforge.net/projects/jacop-solver/) that I add scala wrapper for creating DSL. The scala code contains a number of classes and a package object. Compilation of this scala code works correct the first time but the second time, when doing changes in the code, it reports the following two errors:
error: type _$1 is defined twice
error: type _$1 is defined twice
It does not give any suggestion on possible error :( Cleaning the project and generating once more the code works correct again.
I can send the whole code on request but it is rather big. I send for you scala files that work with current version of JaCoP. Everything is on sourceforge.
/Kris
The text was updated successfully, but these errors were encountered: