In previous public version operations like assigning a char to string variable :
mystr := ',' ;
worked in my project. Now I get this error :
An exception of type: java.lang.NoSuchMethodError occurred
Message: {java.lang.NoSuchMethodError: sugar.String.op_Implicit(C)Ljava/lang/String;}
Expected Behavior:
mystr equals ‘,’
Actual Behavior:
error
Steps:
Cannot reproduce using simple project. Assigning more chars works.
Any ideas, what has changed? Sugar String class looks ok and the same as in previous version. I even recompiled the source but it didn’t help much (sometimes it helps) so it must be the compiler issue.
namespace consoleapplication3;
interface
uses
sugar.*,
java.util;
type
ConsoleApp = class
public
class method Main(args: array of String);
end;
implementation
class method ConsoleApp.Main(args: array of String);
var
s : String ;
begin
s := ',' ;
end;
The trick was to turn all Compatibility options on (Delphi mode) in the project settings ! consoleapplication3.zip (329.7 KB)
We are on 8.3.93.1987 and wanted to switch to 8.3.95.2031 but it’s not possible. I tested the current beta 8.4 but it’s even worse while compiling our projects. Any chance to get fixed 8.3.93 ?
We did what was supposed to be the very last 8.3 release just last week. Any chance you can tell me whats wrong with 8.4 so I can make sure everything there works for you? (This particular issue doesn’t exist in 8.4)
Oke that is curious, did you force a rebuild? (or even clean/build)? I obviously tested this before I replied to you and it worked fine here, so need to find out what the differences are.[quote=“arturredzko, post:10, topic:10458”]
TDictionary<T, U> = public class( java.util.TreeMap<T,U>, Iterable<Map.Entry<T, U>>)
private
method GetKeys: array of T;
……
method TDictionary<T, U>.GetKeys: array of T;
begin
exit keySet.toArray(); // error
end ;
method TDictionary<T, U>.GetValues: array of U;
begin
exit values.toArray(); // error
end ;
[/quote]
But that code really never was right to begin with, you’re upcasting an array. use something like:
exit values.toArray(new U[values.Length]);
(and make both getkeys/getvalues inline methods, that way you can do new U)
True, I made clean rebuild and indeed first case is fixed.
I fixed generics too - inline was the key. And finally after battle I run the main projects.
Now I fight with java.lang.VerifyError : method: CreateCopy signature, Incompatible type for getting or setting field.
I will get back to you later.
I fixed some code problems and it looks like 8.4 beta is compiling fine with my projects. The inlining is great for generic methods to solve errors like “type is not available at runtime”.
How can I get a version that we could use for production? You said that 8.3 is closed.
For now I would recommend to use last fridays build yes (unless there’s a specific fix that you don’t have yet and need). I’ll ask about the next stable release.
The debugging works but I had problems with code editor (no api help list, tips and cc, “Object reference not set to an instance of an object.” in Oxygene logs) for Java. I must verify it again.