Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Error of "Trying to access the this of another class: tree.symbol" in typelevel scala but not in lightbend scala #178

Open
hamidr opened this issue Jan 28, 2018 · 0 comments

Comments

@hamidr
Copy link

hamidr commented Jan 28, 2018

Hi guys,
I am trying to compile this particular file [1] but I encounter the following [2] error.
This actually compiles in the usual scala compiler without any error.
What do you think is wrong here?
[1]

package ptpUtils
import com.github.tminglei.slickpg._
trait PostgresDriver
    extends ExPostgresProfile with PgArraySupport with PgDate2Support with PgPlayJsonSupport with PgNetSupport
    with PgLTreeSupport with PgRangeSupport with PgPostGISSupport with PgHStoreSupport with PgSearchSupport {
  override val pgjson = "jsonb"
  override val api = MyAPI
  object MyAPI
      extends API with ArrayImplicits with DateTimeImplicits with PlayJsonImplicits with NetImplicits
      with LTreeImplicits with PostGISImplicits with PostGISPlainImplicits with RangeImplicits with HStoreImplicits
      with SearchImplicits with SearchAssistants {}
}

object PostgresDriver extends PostgresDriver

[2] The error message:

[error] Error while emitting PostgresDriver.scala
[error] assertion failed: 
[error]   Trying to access the this of another class: tree.symbol = trait PostgresDriver, class symbol = object PostgresDriver$MyAPI compilation unit: PostgresDriver.scala
[error]      while compiling: /home/hamid/projects/hotelbooking-service/app/ptpUtils/PostgresDriver.scala
[error]         during phase: jvm
[error]      library version: version 2.12.4-bin-typelevel-4
[error]     compiler version: version 2.12.4-bin-typelevel-4
[error]   reconstructed args: -encoding utf8 -classpath /home/hamid/projects/hotelbooking-service/target/scala-2.12/classes:/home/hamid/.ivy2/cache/com.typesafe.play/twirl-api_2.12/jars/twirl-api_2.12-1.3.12.jar:/home/hamid/.ivy2/cache/org.scala-lang.modules/scala-xml_2.12/bundles/scala-xml_2.12-1.0.6.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-server_2.12/jars/play-server_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play_2.12/jars/play_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/com.typesafe.play/build-link/jars/build-link-2.6.6.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-exceptions/jars/play-exceptions-2.6.6.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-netty-utils/jars/play-netty-utils-2.6.6.jar:/home/hamid/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.7.25.jar:/home/hamid/.ivy2/cache/org.slf4j/jul-to-slf4j/jars/jul-to-slf4j-1.7.25.jar:/home/hamid/.ivy2/cache/org.slf4j/jcl-over-slf4j/jars/jcl-over-slf4j-1.7.25.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-streams_2.12/jars/play-streams_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/org.reactivestreams/reactive-streams/jars/reactive-streams-1.0.1.jar:/home/hamid/.ivy2/cache/com.typesafe.akka/akka-stream_2.12/jars/akka-stream_2.12-2.5.4.jar:/home/hamid/.ivy2/cache/com.typesafe.akka/akka-actor_2.12/jars/akka-actor_2.12-2.5.4.jar:/home/hamid/.ivy2/cache/com.typesafe/config/bundles/config-1.3.1.jar:/home/hamid/.ivy2/cache/org.scala-lang.modules/scala-java8-compat_2.12/bundles/scala-java8-compat_2.12-0.8.0.jar:/home/hamid/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.12/bundles/scala-parser-combinators_2.12-1.0.6.jar:/home/hamid/.ivy2/cache/com.typesafe.akka/akka-slf4j_2.12/jars/akka-slf4j_2.12-2.5.4.jar:/home/hamid/.ivy2/cache/com.fasterxml.jackson.core/jackson-core/bundles/jackson-core-2.8.10.jar:/home/hamid/.ivy2/cache/com.fasterxml.jackson.core/jackson-annotations/bundles/jackson-annotations-2.8.10.jar:/home/hamid/.ivy2/cache/com.fasterxml.jackson.core/jackson-databind/bundles/jackson-databind-2.8.10.jar:/home/hamid/.ivy2/cache/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/bundles/jackson-datatype-jdk8-2.8.10.jar:/home/hamid/.ivy2/cache/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/bundles/jackson-datatype-jsr310-2.8.10.jar:/home/hamid/.ivy2/cache/commons-codec/commons-codec/jars/commons-codec-1.10.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-json_2.12/jars/play-json_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-functional_2.12/jars/play-functional_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/org.typelevel/scala-reflect/jars/scala-reflect-2.12.4-bin-typelevel-4.jar:/home/hamid/.ivy2/cache/org.typelevel/macro-compat_2.12/jars/macro-compat_2.12-1.1.1.jar:/home/hamid/.ivy2/cache/joda-time/joda-time/jars/joda-time-2.9.9.jar:/home/hamid/.ivy2/cache/com.google.guava/guava/bundles/guava-22.0.jar:/home/hamid/.ivy2/cache/com.google.code.findbugs/jsr305/jars/jsr305-1.3.9.jar:/home/hamid/.ivy2/cache/com.google.errorprone/error_prone_annotations/jars/error_prone_annotations-2.0.18.jar:/home/hamid/.ivy2/cache/com.google.j2objc/j2objc-annotations/jars/j2objc-annotations-1.1.jar:/home/hamid/.ivy2/cache/org.codehaus.mojo/animal-sniffer-annotations/jars/animal-sniffer-annotations-1.14.jar:/home/hamid/.ivy2/cache/io.jsonwebtoken/jjwt/jars/jjwt-0.7.0.jar:/home/hamid/.ivy2/cache/org.apache.commons/commons-lang3/jars/commons-lang3-3.6.jar:/home/hamid/.ivy2/cache/javax.transaction/jta/jars/jta-1.1.jar:/home/hamid/.ivy2/cache/javax.inject/javax.inject/jars/javax.inject-1.jar:/home/hamid/.ivy2/cache/com.typesafe.play/filters-helpers_2.12/jars/filters-helpers_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-logback_2.12/jars/play-logback_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/ch.qos.logback/logback-classic/jars/logback-classic-1.2.3.jar:/home/hamid/.ivy2/cache/ch.qos.logback/logback-core/jars/logback-core-1.2.3.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-akka-http-server_2.12/jars/play-akka-http-server_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/com.typesafe.akka/akka-http-core_2.12/jars/akka-http-core_2.12-10.0.10.jar:/home/hamid/.ivy2/cache/com.typesafe.akka/akka-parsing_2.12/jars/akka-parsing_2.12-10.0.10.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-guice_2.12/jars/play-guice_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/com.google.inject/guice/jars/guice-4.1.0.jar:/home/hamid/.ivy2/cache/aopalliance/aopalliance/jars/aopalliance-1.0.jar:/home/hamid/.ivy2/cache/com.google.inject.extensions/guice-assistedinject/jars/guice-assistedinject-4.1.0.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-openid_2.12/jars/play-openid_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-ahc-ws_2.12/jars/play-ahc-ws_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-ws_2.12/jars/play-ws_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-ws-standalone_2.12/jars/play-ws-standalone_2.12-1.1.2.jar:/home/hamid/.ivy2/cache/com.typesafe/ssl-config-core_2.12/bundles/ssl-config-core_2.12-0.2.2.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-ws-standalone-xml_2.12/jars/play-ws-standalone-xml_2.12-1.1.2.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-ws-standalone-json_2.12/jars/play-ws-standalone-json_2.12-1.1.2.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-ahc-ws-standalone_2.12/jars/play-ahc-ws-standalone_2.12-1.1.2.jar:/home/hamid/.ivy2/cache/com.typesafe.play/cachecontrol_2.12/jars/cachecontrol_2.12-1.1.2.jar:/home/hamid/.ivy2/cache/org.joda/joda-convert/jars/joda-convert-1.7.jar:/home/hamid/.ivy2/cache/com.typesafe.play/shaded-asynchttpclient/jars/shaded-asynchttpclient-1.1.2.jar:/home/hamid/.ivy2/cache/com.typesafe.play/shaded-oauth/jars/shaded-oauth-1.1.2.jar:/home/hamid/.ivy2/cache/javax.cache/cache-api/jars/cache-api-1.0.0.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-ehcache_2.12/jars/play-ehcache_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-cache_2.12/jars/play-cache_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/net.sf.ehcache/ehcache/jars/ehcache-2.10.4.jar:/home/hamid/.ivy2/cache/org.ehcache/jcache/jars/jcache-1.0.1.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-jdbc-evolutions_2.12/jars/play-jdbc-evolutions_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-jdbc-api_2.12/jars/play-jdbc-api_2.12-2.6.6.jar:/home/hamid/.ivy2/cache/org.typelevel/cats-core_2.12/jars/cats-core_2.12-1.0.1.jar:/home/hamid/.ivy2/cache/org.typelevel/cats-macros_2.12/jars/cats-macros_2.12-1.0.1.jar:/home/hamid/.ivy2/cache/org.typelevel/machinist_2.12/jars/machinist_2.12-0.6.2.jar:/home/hamid/.ivy2/cache/org.typelevel/cats-kernel_2.12/jars/cats-kernel_2.12-1.0.1.jar:/home/hamid/.ivy2/cache/com.chuusai/shapeless_2.12/bundles/shapeless_2.12-2.3.3.jar:/home/hamid/.ivy2/cache/org.postgresql/postgresql/bundles/postgresql-42.1.4.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-iteratees_2.12/jars/play-iteratees_2.12-2.6.1.jar:/home/hamid/.ivy2/cache/org.scala-stm/scala-stm_2.12/jars/scala-stm_2.12-0.8.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-iteratees-reactive-streams_2.12/jars/play-iteratees-reactive-streams_2.12-2.6.1.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-slick_2.12/jars/play-slick_2.12-3.0.1.jar:/home/hamid/.ivy2/cache/com.typesafe.slick/slick_2.12/bundles/slick_2.12-3.2.1.jar:/home/hamid/.ivy2/cache/com.typesafe.slick/slick-hikaricp_2.12/bundles/slick-hikaricp_2.12-3.2.1.jar:/home/hamid/.ivy2/cache/com.zaxxer/HikariCP/bundles/HikariCP-2.5.1.jar:/home/hamid/.ivy2/cache/com.typesafe.play/play-slick-evolutions_2.12/jars/play-slick-evolutions_2.12-3.0.1.jar:/home/hamid/.ivy2/cache/com.github.tototoshi/play-json-naming_2.11/jars/play-json-naming_2.11-1.2.0.jar:/home/hamid/.ivy2/cache/com.vividsolutions/jts/jars/jts-1.13.jar:/home/hamid/.ivy2/cache/com.github.tminglei/slick-pg_2.12/jars/slick-pg_2.12-0.15.4.jar:/home/hamid/.ivy2/cache/com.github.tminglei/slick-pg_core_2.12/jars/slick-pg_core_2.12-0.15.4.jar:/home/hamid/.ivy2/cache/com.github.tminglei/slick-pg_json4s_2.12/jars/slick-pg_json4s_2.12-0.15.4.jar:/home/hamid/.ivy2/cache/org.json4s/json4s-ast_2.12/jars/json4s-ast_2.12-3.5.0.jar:/home/hamid/.ivy2/cache/org.json4s/json4s-core_2.12/jars/json4s-core_2.12-3.5.0.jar:/home/hamid/.ivy2/cache/org.json4s/json4s-scalap_2.12/jars/json4s-scalap_2.12-3.5.0.jar:/home/hamid/.ivy2/cache/com.thoughtworks.paranamer/paranamer/bundles/paranamer-2.8.jar:/home/hamid/.ivy2/cache/com.github.tminglei/slick-pg_jts_2.12/jars/slick-pg_jts_2.12-0.15.4.jar:/home/hamid/.ivy2/cache/com.github.tminglei/slick-pg_play-json_2.12/jars/slick-pg_play-json_2.12-0.15.4.jar -Yliteral-types -deprecation -Xstrict-patmat-analysis -Xlint:strict-unsealed-patmat -Ykind-polymorphism -Ypartial-unification -Yinduction-heuristics -unchecked -bootclasspath /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.fc27.x86_64/jre/lib/resources.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.fc27.x86_64/jre/lib/rt.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.fc27.x86_64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.fc27.x86_64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.fc27.x86_64/jre/lib/jce.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.fc27.x86_64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.fc27.x86_64/jre/lib/jfr.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.fc27.x86_64/jre/classes:/home/hamid/.ivy2/cache/org.typelevel/scala-library/jars/scala-library-2.12.4-bin-typelevel-4.jar
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant