Jump to content
  • Advertisement
Sign in to follow this  
TheAtom

Shared template factory stub

This topic is 2538 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When compiling a shared class that uses a template (array, say), a rather cryptic error appears:


Shared code cannot call non-shared function 'int[]@ factstub()'


Shouldn't the factory stubs be marked as shared when they are generated?

Share this post


Link to post
Share on other sites
Advertisement
A probably unrelated issue I have is that I cannot use shared classes as members of the ordinary classes. Is that intended? The manual only states about non-shared entities being (obviously) inaccessible within the entities, but this is the opposite situation.

Share this post


Link to post
Share on other sites
It does when the first script that uses the shared class (as a member) is compiled, but the consecutive scripts throw
Illegal member type

Share this post


Link to post
Share on other sites
The problem was that as the shared class was already existing from the previous module it wasn't validated again to check for illegal members. Because the validation was skipped, I forgot to set the type as valid in the new module.

I've fixed this in revision 1092.

Share this post


Link to post
Share on other sites
I'll check this once we update to the latest revision, but I am interested: can the shared classes eventually lead to the separation of class declaration and its implementation? That would do wonders for compilation time in many cases. I realize problems arising from the fact that the script modules would cease to be standalone entities, so is such a separation in plans?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!