I am new to Swift, I have a class that has properties that belong to other classes.
class Pizza {
var tamaño=Tamaño.self
var masa=Masa.self
var queso=Queso.self
var ingredientes = [Ingrediente]()
var aa:String = ""
}
The problem is that I can not assign them values, I get the following error "Can not assign value of type 'Size' to type 'Size.Type'"
var pi:Pizza=Pizza()
var t:Tamaño=Tamaño(nombre: "min", precio: 25)
pi.tamaño=t
When it is another type of data such as Int, String or a Struct it leaves me but when they are objects of a class that I have created, it does not leave me. Does Swift allow it? What is my fault? Can I only do it with Struct? Greetings.