I am missing the possibility to initialize Structs like you do it with classes. Will that be implemented by time too?
Can you elaborate?
e.g. in xcode i can have a declaration like this one:
struct x {
var x
var y
init(new x: x, new y: y) {
x = newx
y = newy
}
}
var newx = x(newx: x, newy: y)
but in fire it doesn’t work
Thanks, logged as bugs://71656
bugs://71656 got closed with status fixed.
Next build this should compile (matching Swift):
struct x {
var x: Integer
var y: Integer
public init(newx: Integer, newy: Integer) {
x = newx
y = newy
}
}
var x2 = 15
var y = 12
var newx = x(newx: x2, newy: y)