Skip to main content
GameDev.net gamedev.net
🔒 Locked

Bug with namespaces?

Started by xertrov Jun 18, 2022 at 5:11 AM 2 replies 7k views
Original Post
xertrov
xertrov

I think I might have found a bug with how namespaces are handled. The maintainer of the relevant project (Openplanet) suggested I report it here.

My understanding is that this should work:

class DictOfChallenge_WriteLog : _DictOfChallenge_WriteLog::DictOfChallenge_WriteLog {}
namespace _DictOfChallenge_WriteLog {
  class DictOfChallenge_WriteLog {}
}
namespace DictOfChallenge_WriteLog {
  class KvPair : _KvPair::KvPair {}
  namespace _KvPair {
    class KvPair {}
  }
}

I get a compilation error though:
ERR: Namespace '_KvPair' doesn't exist

(Note: it doesn't matter if class KvPair : _KvPair::KvPair {} is declared before or after the _KvPair namespace)

If anyone is curious about the class/NS names and why anything would be structured like this, I'm writing a code generator (code: https://github.com/XertroV/op-as-codegen/​ ) to provide an experience that's closer to higher level languages but which can't be done in angelscript. (there's some up-to-date sample generated code in the ./codegen folder)​

WitchLord
WitchLord

Thanks for e Sporting this. I'll investigate it and ler you know what I find.

Regards,

Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - <a href="http://www.angelcode.com/tower" rel
WitchLord
WitchLord

I've fixed this in revision 2812.

I'm sorry for the long delay.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - <a href="http://www.angelcode.com/tower" rel

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.