From: SourceForge.net <no...@so...> - 2003-03-12 16:35:39
|
Bugs item #702315, was opened at 2003-03-12 10:47 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=702315&group_id=44253 Category: Compiler integration Group: Serious Status: Open Resolution: None Priority: 5 Submitted By: Jaime Nino (jnino) Assigned to: Nobody/Anonymous (nobody) Summary: generic expression evaluation fail Initial Comment: The interactions panel gives the following error: edu.rice.cs.drjava.model.repl.InteractionsException: There was a syntax error in the previous input. when entering an expression that was also compiled successfully. Specifically, after getting the above error I proceeded to enter the expression as part of the class that I wanted to use; in the class the code produces no error as the compilation is successful but the same expression yields an error in the interaction window. This is the code I wrote while trying the generic component: class Pair<T, U> { private T first; private U second; public Pair ( T comp1, U comp2){ first = comp1; second = comp2; } public T first(){ return first; } public U second(){ return second; } public static void main(String[] args){ Pair<String, String> p; p = new Pair<String, String>( "hello", "there"); X1 a = new X1(); Pair<String, X1> q = new Pair<String, X1>("hello", a); } } This code compiles successfully. If I take the first statement in the main and I write it in the interaction window it produces the error mentioned. DrJava version: drjava-stable-20030203.jar JDK version: 1.4.1_01 with the addition of JSR-14 generic lib and compilation scripts. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=702315&group_id=44253 |