Skip to content
This repository was archived by the owner on Jul 12, 2025. It is now read-only.

Commit cfb8bd4

Browse files
committed
- re-word an error message
- mention overloading in readme
1 parent 544b9fb commit cfb8bd4

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ s.whatAmI(); //I am a rectangle. I am a square.
7373

7474
### Protected members
7575

76-
Additionally, a class can give its descendants protected access to its private variables. Once <code>*Super*()</code> is called within the constructor, the protected properties of its parent class are made available via <code>*Super*.protected</code>. This object will be available to child classes as well; any additions to or deletions of its members that are made here in the constructor will be reflected in the class' descendants.
76+
Additionally, a class can give its descendants protected access to its private variables. Once <code>*Super*()</code> is called within the constructor, the protected properties of its parent class are made available via <code>*Super*.protected</code>. This object will be available to child classes as well; any additions/deletions/overloads of its members that are made here in the constructor will be reflected in the class' descendants.
7777

7878
#### Example
7979

src/Class.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
$constructorFn.apply(newInstance, [superFn].concat([].slice.call(arguments))); //(This way it doesn't create another new function every time a constructor is run.)
119119

120120
if(!superFnCalled && !$warnedAboutSuper){
121-
warn(newClass.name+" constructor does not call Super()");
121+
warn(newClass.name+" instance is not initialized by its parent class");
122122
$warnedAboutSuper = true; //prevent multiple warnings about the same issue
123123
}
124124

0 commit comments

Comments
 (0)