You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.
Defining a method signature in a class automatically makes both the method and the containing class abstract per the rules of Quark. However, Quark will compile files that instantiate abstract classes (both with and without explicitly defined constructors).
The resulting Java code does not compile:
$ javac Functions.java
Functions.java:3: error: Unit is abstract; cannot be instantiated
convert.Unit length1 = new convert.Unit("length", "meter", 20.0);
^
Functions.java:4: error: Unit is abstract; cannot be instantiated
convert.Unit length2 = new convert.Unit("length", "foot", 0.0);
^
Functions.java:5: error: Unit2 is abstract; cannot be instantiated
convert.Unit2 abs = new convert.Unit2();
^
3 errors
``
The resulting Python and Javascript works as long as you do not actively try to use the abstract method.
The text was updated successfully, but these errors were encountered:
Defining a method signature in a class automatically makes both the method and the containing class abstract per the rules of Quark. However, Quark will compile files that instantiate abstract classes (both with and without explicitly defined constructors).
The resulting Java code does not compile:
The text was updated successfully, but these errors were encountered: