- changed status to resolved
Crash of an invalid snippet
Again, I have found an intermediate state that results in a crash (access to a null pointer). I haven’t researched it further so far:
unit FooBar
interface
type
TFoo = class
TBar = class
protected
class var FooBar: String;
end;
implementation
end.
Comments (3)
-
repo owner -
reporter Sorry for the late reply, but I have been in the summer vacations.
I think that the current fix is too limiting. If one wants to nest an anonymous class within an anonymous class it should be allowed, especially in combination with the JSCodeGen.
Otherwise it’s not possible to pass non typed complex parameters to external functions. For examples sometims the options that need to be passed are quite complex.
In my code I have something like:
pushNotification.init(JInitOptions( class android = class senderID = '644366289459'; end; ios = class alert = 'true'; end; end));
which worked out pretty well in the past.
After compilation the code looks like:
pushNotification.init({ android: {senderID = '644366289459'}; ios: {alert: "true"} }
With the patch, the above code doesn’t work anymore. Maybe there are other ways to solve this, but the above code should also work.
-
repo owner Should have been fixed by commit fbf002e97432b4b393bbf106d63777ff01ef126c
The “fix” was too aggressive indeed, and the actual bug was one with class variable allocation, which were “scoped” to the parent context, while they should have been globals.
- Log in to comment
Fixed
#161, AV that could occur when declaring an anonymous class from within a class (which is currently not supported)→ <<cset 8635ec153567>>