Last modified: 2014-03-11 02:05:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54482, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52482 - VisualEditor: Use null instead of flame throwers as abstract method value
VisualEditor: Use null instead of flame throwers as abstract method value
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Technical Debt (Other open bugs)
unspecified
All All
: Low enhancement
: ---
Assigned To: Editing team bugs – take if you're interested!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-02 21:30 UTC by Krinkle
Modified: 2014-03-11 02:05 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2013-08-02 21:30:17 UTC
/**
 * @abstract
 * @method
 */
ve.foo.Bar.prototype.abstractMethod = function () {
   throw new Error( 've.foo.Bar subclass must implement abstractMethod');
};


x.abstractMethod();
> Error: ve.foo.Bar subclass must implement abstractMethod


/**
 * @abstract
 * @method
 */
ve.foo.Bar.prototype.abstractMethod = null;

x.abstractMethod();
> TypeError: Property 'abstractMethod' of object #<VeFooQuuxBar> is not a function

Seems easier to maintain and good enough.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links