sourcemod/sourcepawn/compiler/tests/ok-properties.sp

30 lines
402 B
SourcePawn
Raw Normal View History

2014-06-23 07:02:02 +02:00
native Float:GetCrabWhat(Crab:crab);
methodmap Crab {
public Crab(n) {
return Crab:n;
}
property Crab Yams {
public get() {
return Crab:5;
}
}
property int Blah {
public native get();
}
property float What {
public get() = GetCrabWhat;
}
}
print(n) {
return n
}
public main() {
new Crab:crab = Crab(10);
print(_:crab.Yams.Yams.Yams)
print(crab.Blah);
print(_:crab.What);
}