nhatminhle / cofoja

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

Contracts cannot be added to an enum that implements an interface through its constants #1

Open nhatminhle opened 10 years ago

nhatminhle commented 10 years ago

From nhat.min...@gmail.com on November 01, 2010 06:56:43

The following code crashes the contract compiler:

interface A { @Requires("false") public void f(); }

enum G implements A { X { public void f() { } }, Y { @Requires("this == Y") public void f() { } }; }

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

nhatminhle commented 10 years ago

From nhat.min...@gmail.com on November 01, 2010 07:55:39

s/crashes/does not compile with/