Jump to content
Sign in to follow this  

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this