Ticket #2090
Hi,
I have found maybe small bug. When I have abstract class and I want to create instance by reflection, Java runtime complains with exception but JS runtime creates instance of class and continues at work.
Code:
type := AbstractClass# echo(type.make)
Java script runtime output:
-- Run: xmlparse::MyTest.test2... xmlparse::AbstractClass Pass: xmlparse::MyTest.test2 [0]
Java runtime output:
-- Run: xmlparse::MyTest.test2... TEST FAILED sys::Err: java.lang.InstantiationError: fan.xmlparse.AbstractClass xmlparse::AbstractClass.make (Main.fan:44) java.lang.reflect.Method.invoke (Method.java:601) fan.sys.Method.invoke (Method.java:559) fan.sys.Method$MethodFunc.callList (Method.java:198) fan.sys.Type.make (Type.java:245) fan.sys.ClassType.make (ClassType.java:110) fan.sys.Type.make (Type.java:235) xmlparse::MyTest.test2 (MyTest.fan:13) java.lang.reflect.Method.invoke (Method.java:601) fan.sys.Method.invoke (Method.java:559) fan.sys.Method$MethodFunc.callList (Method.java:204) fan.sys.Method.callList (Method.java:138) fanx.tools.Fant.runTest (Fant.java:191) fanx.tools.Fant.test (Fant.java:110) fanx.tools.Fant.test (Fant.java:32) fanx.tools.Fant.run (Fant.java:284) fanx.tools.Fant.main (Fant.java:327)
Promoted to ticket #2090 and assigned to andy
Thanks a lot :-)
Ticket resolved in 1.0.70
Fixed - changeset
Login or Signup to reply.
bedla Tue 29 Jan 2013
Hi,
I have found maybe small bug. When I have abstract class and I want to create instance by reflection, Java runtime complains with exception but JS runtime creates instance of class and continues at work.
Code:
Java script runtime output:
Java runtime output:
andy Wed 30 Jan 2013
Promoted to ticket #2090 and assigned to andy
bedla Fri 1 Feb 2013
Thanks a lot :-)
andy Thu 8 Jun 2017
Ticket resolved in 1.0.70
Fixed - changeset