nhatminhle / cofoja

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

Build path error #29

Closed nhatminhle closed 9 years ago

nhatminhle commented 9 years ago

From sagarf...@gmail.com on July 12, 2011 11:24:15

What steps will reproduce the problem? 1. load the program Contracts.java

  1. it doesn't give any error for invalid/not defined variable c
  2. I have added the cofoja-latest.jar and asm-all-3.3.1.jar to build path of project.
  3. Also, followed steps mentioned on http://fsteeg.com/2011/02/07/setting-up-contracts-for-java-in-eclipse/#comment-228 What is the expected output? What do you see instead? It should give error in Contract.java for undefined symbol c. What version of the product are you using? On what operating system? eclipse 3.6.1 , vista os. Please provide any additional information below. Contracts.java program that I have loaded.

package temp; import com.google.java.contract.Ensures; import com.google.java.contract.Requires;

public class Contracts{ public static void main(String[] args) {

    System.out.println(new Numbers().add(-10, 5));

}

}

class Numbers {

@Requires({ "c > 0", "b > 0" })   // not giving error for var. c                   

@Ensures({ "result > a", "result > b" })

int add(int a, int b) {

    return a - b;

}

}

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

nhatminhle commented 9 years ago

From chat...@google.com on August 03, 2011 04:25:53

Status: Duplicate
Mergedinto: 27