nhatminhle / cofoja

Contracts for Java
GNU Lesser General Public License v3.0
151 stars 18 forks source link

Support anonymous classes inside contracts #6

Open nhatminhle opened 10 years ago

nhatminhle commented 10 years ago

From chat...@google.com on August 05, 2011 04:51:27

Currently it is not possible to define an anonymous class inside a contract. When trying to define one, the error is that the correspondent ...$1 class was not found in the classpath.

The reason is that the generated classfile of the anonymous class has the .contracts extension, instead of .class, and thus is not found.

Simply changing the extension of anonymous classes ("\$[0-9]+") is not a solution since it breaks anonymous classes with contracts on it (sorry about the changelist :P).

Original issue: http://code.google.com/p/cofoja/issues/detail?id=29

nhatminhle commented 10 years ago

From 7jp...@gmail.com on October 30, 2012 13:10:09

Hi, it just happened to me and, after a good couple hours and another couple heads, We were able to identify the problem. Although not resolve it without removing the inner class. I was about to submit the problem when I checked the issues... It seems that it is still open on the latest cofoja-1.0- r139 .jar.