diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index c54931a16f..c981a00e96 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -253,7 +253,6 @@ void PType::StaticInit() RUNTIME_CLASS(PMap)->TypeTableType = RUNTIME_CLASS(PMap); RUNTIME_CLASS(PStruct)->TypeTableType = RUNTIME_CLASS(PStruct); RUNTIME_CLASS(PPrototype)->TypeTableType = RUNTIME_CLASS(PPrototype); - RUNTIME_CLASS(PFunction)->TypeTableType = RUNTIME_CLASS(PFunction); RUNTIME_CLASS(PClass)->TypeTableType = RUNTIME_CLASS(PClass); TypeTable.AddType(TypeSInt8 = new PInt(1, false)); diff --git a/src/dobjtype.h b/src/dobjtype.h index a6f3bd8438..c9ba10f394 100644 --- a/src/dobjtype.h +++ b/src/dobjtype.h @@ -440,9 +440,9 @@ protected: }; // TBD: Should we really support overloading? -class PFunction : public PNamedType +class PFunction : public PSymbol { - DECLARE_CLASS(PFunction, PNamedType); + DECLARE_CLASS(PFunction, PSymbol); public: struct Variant { @@ -452,6 +452,9 @@ public: TArray Variants; size_t PropagateMark(); + + PFunction(FName name) : PSymbol(name) {} + PFunction() : PSymbol(NAME_None) {} }; // Meta-info for every class derived from DObject ---------------------------