2cc1340a7b
* Ignore @private on constructor functions This was incorrect in the best of circumstances and caused a crash when the parent of the function had no symbol, because the accessibility check assumed it was operating on a constructor and that the parent was always the containing class. * Non-constructors are always accessible Previously, all function-like kinds were accessible, which includes constructors. This was wrong.
15 lines
320 B
TypeScript
15 lines
320 B
TypeScript
// @allowjs: true
|
|
// @checkjs: true
|
|
// @outdir: salsa
|
|
// @declaration: true
|
|
// @filename: privateConstructorFunction.js
|
|
{
|
|
// make sure not to crash when parent's a block rather than a source file or some other
|
|
// symbol-having node.
|
|
|
|
/** @private */
|
|
function C() {
|
|
this.x = 1
|
|
}
|
|
new C()
|
|
}
|