dart-lang / site-www

Source for Dart website
https://dart.dev
Other
935 stars 675 forks source link

Update abstract class example in class-modifiers.md #5925

Closed av153k closed 1 week ago

av153k commented 1 week ago

The example for abstract classes has an issue. I think it's a typo. The extending class Car does not override the abstract method moveForward from abstract class Vehicle. So I just made the method moveForward a normal method rather than abstract method that it was. If suggested, I can also change the Car class to implement the original abstract moveForward method. But I think making it normal, will clarify the difference between extends and implements.

Fixes


Contribution guidelines:
- See our [contributor guide](https://github.com/dart-lang/site-www/blob/main/CONTRIBUTING.md) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Code changes should generally follow the [Dart style guide](https://dart.dev/effective-dart) and use `dart format`. - Updates to [code excerpts](https://github.com/dart-lang/site-shared/blob/main/doc/code-excerpts.md) indicated by `
google-cla[bot] commented 1 week ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.