Jump to content
Sign in to follow this  
tudor.timi

Clarification on example 152

Recommended Posts

The second class definition in the example is unclear:

import class ext : base {
  void ext_method();
}

Is base a class that is imported? The syntax doesn't suggest this, since the import is before class_ext. Why not force the user to import base separately and inherit from it in a separate declaration?

Share this post


Link to post
Share on other sites

From the PSWG:

Imported classes and methods are declarations of external APIs. In example 152, both 'base' and 'ext' are declared as import classes. The fact that 'base' was declared with an import qualifier makes it an imported class.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...