EP
https://forum.dlang.org/post/gfyhdqecjxszrgutlhmi@forum.dlang.org
Size: a a a
EP
EP
МВ
FM
FM
class People {
string name;
int age;
string male;
string phrase;
this(string name, int age, string male, string phrase) {
this.name = name;
this.age = age;
this.male = male;
this.phrase = phrase;
}
People say() {
return phrase;
}
People dup() const {
return new People(name, age, male, phrase);
}
}FM
void main(string[] args) {
auto var1 = new People("Max", 24, "man", "Hello");
writeln(var1.say(), var1.name);
}МВ
FM
Error: cannot implicitly convert expression `this.phrase` of type `string` to `app.People`
/usr/bin/dmd failed with exit code 1
U
МВ
U
FM
FM
FM
U