72 lines
974 B
Plaintext
72 lines
974 B
Plaintext
exports[`test with_munging.js 1`] = `
|
|
"/**
|
|
* @flow
|
|
*/
|
|
|
|
class Foo {
|
|
_method(): string {
|
|
return \'this is private\';
|
|
}
|
|
}
|
|
|
|
class Bar extends Foo {
|
|
test() {
|
|
(this._method(): string); // error
|
|
}
|
|
}
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
/**
|
|
* @flow
|
|
*/
|
|
|
|
class Foo {
|
|
_method(): string {
|
|
return \"this is private\";
|
|
}
|
|
}
|
|
|
|
class Bar extends Foo {
|
|
test() {
|
|
(this._method(): string); // error
|
|
}
|
|
}
|
|
"
|
|
`;
|
|
|
|
exports[`test without_munging.js 1`] = `
|
|
"/**
|
|
* @flow
|
|
* @preventMunge
|
|
*/
|
|
|
|
class Foo {
|
|
_method(): string {
|
|
return \'this is not private\';
|
|
}
|
|
}
|
|
|
|
class Bar extends Foo {
|
|
test() {
|
|
(this._method(): string); // ok
|
|
}
|
|
}
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
/**
|
|
* @flow
|
|
* @preventMunge
|
|
*/
|
|
|
|
class Foo {
|
|
_method(): string {
|
|
return \"this is not private\";
|
|
}
|
|
}
|
|
|
|
class Bar extends Foo {
|
|
test() {
|
|
(this._method(): string); // ok
|
|
}
|
|
}
|
|
"
|
|
`;
|