-
-
Save mrerrormessage/700ef22b012612500a535568e120f19d to your computer and use it in GitHub Desktop.
scalaJavaAbstractBug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bug | |
abstract class AbstractFoo { | |
def bar: String | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scalaVersion := "2.12.3" | |
name := "scalaBug" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bug; | |
abstract class Foo extends AbstractFoo { | |
String bar = "abc"; | |
public String baz() { | |
return bar(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bug | |
object Main extends App { | |
val f = new Foo() { } | |
println(f.baz) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[info] Loading project definition from /Users/rgg284/IdeaProjects/scratch/scalaBug/project | |
[info] Loading settings from build.sbt ... | |
[info] Set current project to scalaBug (in build file:/Users/rgg284/IdeaProjects/scratch/scalaBug/) | |
[info] Running bug.Main | |
[debug] Waiting for threads to exit or System.exit to be called. | |
[debug] Classpath: | |
[debug] /var/folders/68/w07y5fl166xg29544twmpz3rs3h0zr/T/sbt_c7cf7439/job-1/target/73718f77/scalabug_2.12-0.1-SNAPSHOT.jar | |
[debug] /var/folders/68/w07y5fl166xg29544twmpz3rs3h0zr/T/sbt_c7cf7439/target/f2e496f2/scala-library.jar | |
[debug] Waiting for thread run-main-0 to terminate. | |
[error] (run-main-0) java.lang.AbstractMethodError: bug.Foo.bar()Ljava/lang/String; | |
[error] java.lang.AbstractMethodError: bug.Foo.bar()Ljava/lang/String; | |
[error] at bug.Foo.baz(Foo.java:7) | |
[error] at bug.Main$.delayedEndpoint$bug$Main$1(Main.scala:5) | |
[error] at bug.Main$delayedInit$body.apply(Main.scala:3) | |
[error] at scala.Function0.apply$mcV$sp(Function0.scala:34) | |
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:34) | |
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12) | |
[error] at scala.App.$anonfun$main$1$adapted(App.scala:76) | |
[error] at scala.collection.immutable.List.foreach(List.scala:389) | |
[error] at scala.App.main(App.scala:76) | |
[error] at scala.App.main$(App.scala:74) | |
[error] at bug.Main$.main(Main.scala:3) | |
[error] at bug.Main.main(Main.scala) | |
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | |
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:564) | |
[error] at sbt.Run.invokeMain(Run.scala:89) | |
[error] at sbt.Run.run0(Run.scala:83) | |
[error] at sbt.Run.execute$1(Run.scala:61) | |
[error] at sbt.Run.$anonfun$run$4(Run.scala:73) | |
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) | |
[error] at sbt.util.InterfaceUtil$$anon$1.get(InterfaceUtil.scala:10) | |
[error] at sbt.TrapExit$App.run(TrapExit.scala:252) | |
[error] at java.base/java.lang.Thread.run(Thread.java:844) | |
[error] java.lang.RuntimeException: Nonzero exit code: 1 | |
[error] at sbt.Run$.executeTrapExit(Run.scala:120) | |
[error] at sbt.Run.run(Run.scala:73) | |
[error] at sbt.Defaults$.$anonfun$bgRunTask$5(Defaults.scala:1155) | |
[error] at sbt.Defaults$.$anonfun$bgRunTask$5$adapted(Defaults.scala:1150) | |
[error] at sbt.internal.BackgroundThreadPool.$anonfun$run$1(DefaultBackgroundJobService.scala:331) | |
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) | |
[error] at scala.util.Try$.apply(Try.scala:209) | |
[error] at sbt.internal.BackgroundThreadPool$BackgroundRunnable.run(DefaultBackgroundJobService.scala:254) | |
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) | |
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) | |
[error] at java.base/java.lang.Thread.run(Thread.java:844) | |
[error] (compile:run) Nonzero exit code: 1 | |
[error] Total time: 1 s, completed Sep 29, 2017, 11:35:21 AM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment