We're updating the issue view to help you get more done. 

VerifyError in Clojure 1.8.0-(beta1..RC1)

Description

Nicola Mometto provided the below minimal repro case:

1 2 3 4 user=> (defn foo ^long [] 1) #'user/foo user=> (Integer/bitCount ^int (foo)) VerifyError (class: user$eval13, method: invokeStatic signature: ()Ljava/lang/Object;) Expecting to find integer on stack java.lang.Class.getDeclaredConstructors0 (Class.java:-2)

Full stack trace as found with https://github.com/kumarshantanu/asphalt:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 $ lein do clean, with-profile dev,c18 test Exception in thread "main" java.lang.VerifyError: (class: asphalt/core$invoke_with_transaction, method: invokeStatic signature: (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;) Expecting to find integer on stack, compiling:(core.clj:201:1) at clojure.lang.Compiler$DefExpr.eval(Compiler.java:463) at clojure.lang.Compiler.eval(Compiler.java:6918) at clojure.lang.Compiler.load(Compiler.java:7360) at clojure.lang.RT.loadResourceScript(RT.java:372) at clojure.lang.RT.loadResourceScript(RT.java:363) at clojure.lang.RT.load(RT.java:453) at clojure.lang.RT.load(RT.java:419) at clojure.core$load$fn__5673.invoke(core.clj:5895) at clojure.core$load.invokeStatic(core.clj:5894) at clojure.core$load_one.invokeStatic(core.clj:5694) at clojure.core$load_one.invoke(core.clj) at clojure.core$load_lib$fn__5622.invoke(core.clj:5739) at clojure.core$load_lib.invokeStatic(core.clj:5738) at clojure.core$load_lib.doInvoke(core.clj) at clojure.lang.RestFn.applyTo(RestFn.java:142) at clojure.core$apply.invokeStatic(core.clj:647) at clojure.core$load_libs.invokeStatic(core.clj:5776) at clojure.core$load_libs.doInvoke(core.clj) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invokeStatic(core.clj:647) at clojure.core$require.invokeStatic(core.clj:5798) at clojure.core$require.doInvoke(core.clj) at clojure.lang.RestFn.invoke(RestFn.java:457) at asphalt.test_util$eval198$loading__5565__auto____199.invoke(test_util.clj:1) at asphalt.test_util$eval198.invokeStatic(test_util.clj:1) at asphalt.test_util$eval198.invoke(test_util.clj) at clojure.lang.Compiler.eval(Compiler.java:6913) at clojure.lang.Compiler.eval(Compiler.java:6902) at clojure.lang.Compiler.load(Compiler.java:7360) at clojure.lang.RT.loadResourceScript(RT.java:372) at clojure.lang.RT.loadResourceScript(RT.java:363) at clojure.lang.RT.load(RT.java:453) at clojure.lang.RT.load(RT.java:419) at clojure.core$load$fn__5673.invoke(core.clj:5895) at clojure.core$load.invokeStatic(core.clj:5894) at clojure.core$load_one.invokeStatic(core.clj:5694) at clojure.core$load_one.invoke(core.clj) at clojure.core$load_lib$fn__5622.invoke(core.clj:5739) at clojure.core$load_lib.invokeStatic(core.clj:5738) at clojure.core$load_lib.doInvoke(core.clj) at clojure.lang.RestFn.applyTo(RestFn.java:142) at clojure.core$apply.invokeStatic(core.clj:647) at clojure.core$load_libs.invokeStatic(core.clj:5776) at clojure.core$load_libs.doInvoke(core.clj) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invokeStatic(core.clj:647) at clojure.core$require.invokeStatic(core.clj:5798) at clojure.core$require.doInvoke(core.clj) at clojure.lang.RestFn.invoke(RestFn.java:457) at asphalt.core_test$eval192$loading__5565__auto____193.invoke(core_test.clj:1) at asphalt.core_test$eval192.invokeStatic(core_test.clj:1) at asphalt.core_test$eval192.invoke(core_test.clj) at clojure.lang.Compiler.eval(Compiler.java:6913) at clojure.lang.Compiler.eval(Compiler.java:6902) at clojure.lang.Compiler.load(Compiler.java:7360) at clojure.lang.RT.loadResourceScript(RT.java:372) at clojure.lang.RT.loadResourceScript(RT.java:363) at clojure.lang.RT.load(RT.java:453) at clojure.lang.RT.load(RT.java:419) at clojure.core$load$fn__5673.invoke(core.clj:5895) at clojure.core$load.invokeStatic(core.clj:5894) at clojure.core$load_one.invokeStatic(core.clj:5694) at clojure.core$load_one.invoke(core.clj) at clojure.core$load_lib$fn__5622.invoke(core.clj:5739) at clojure.core$load_lib.invokeStatic(core.clj:5738) at clojure.core$load_lib.doInvoke(core.clj) at clojure.lang.RestFn.applyTo(RestFn.java:142) at clojure.core$apply.invokeStatic(core.clj:647) at clojure.core$load_libs.invokeStatic(core.clj:5776) at clojure.core$load_libs.doInvoke(core.clj) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invokeStatic(core.clj:647) at clojure.core$require.invokeStatic(core.clj:5798) at clojure.core$require.doInvoke(core.clj) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invokeStatic(core.clj:647) at clojure.core$apply.invoke(core.clj) at user$eval91.invokeStatic(form-init7505432955041312280.clj:1) at user$eval91.invoke(form-init7505432955041312280.clj) at clojure.lang.Compiler.eval(Compiler.java:6913) at clojure.lang.Compiler.eval(Compiler.java:6903) at clojure.lang.Compiler.load(Compiler.java:7360) at clojure.lang.Compiler.loadFile(Compiler.java:7298) at clojure.main$load_script.invokeStatic(main.clj:275) at clojure.main$init_opt.invokeStatic(main.clj:277) at clojure.main$init_opt.invoke(main.clj) at clojure.main$initialize.invokeStatic(main.clj:308) at clojure.main$null_opt.invokeStatic(main.clj:342) at clojure.main$null_opt.invoke(main.clj) at clojure.main$main.invokeStatic(main.clj:421) at clojure.main$main.doInvoke(main.clj) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:383) at clojure.lang.AFn.applyToHelper(AFn.java:156) at clojure.lang.Var.applyTo(Var.java:700) at clojure.main.main(main.java:37) Caused by: java.lang.VerifyError: (class: asphalt/core$invoke_with_transaction, method: invokeStatic signature: (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;) Expecting to find integer on stack at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) at java.lang.Class.getConstructor0(Class.java:3075) at java.lang.Class.newInstance(Class.java:412) at clojure.lang.Compiler$ObjExpr.eval(Compiler.java:4902) at clojure.lang.Compiler$DefExpr.eval(Compiler.java:450) ... 95 more

Environment

Oracle JDK 1.7, Oracle JDK 1.8 on Mac OS X

Status

Assignee

Unassigned

Reporter

import

Labels

Approval

Vetted

Patch

None

Fix versions

Affects versions

Release 1.8

Priority

Major