IDE: Visual Studio X/Fire
Version: 10.0.0.2399 (develop)
Target (If relevant): NET
Description:
Swift allows generic initializers, therefore I would expect either the error to mention it’s being specific to Silver, or to allow it because Java allows generic constructors (docs).
However, it would seem form a little testing that Elements does not support generic constructors in Iodine either. (example source)
Expected Behavior:
“E: Generics not allowed here in Silver [<file> (<line>)]”
Or, preferably:
Compiles.
Actual Behavior:
(A) “E: Generics not allowed here [<file> (<line>)]”
(B) “E: identifier expected, got opening parenthesis [<file> (<line>)]”
Steps:
Silver:
class S {
init<T>(_ t: T) {} // Error A
}
Iodine:
class Test {
public <T> Test(T item) { // Error B
//
}
}