File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
test/com/google/javascript/jscomp Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -1249,6 +1249,48 @@ public void testGenericPrototypeObject() {
1249
1249
test (js , output );
1250
1250
}
1251
1251
1252
+ @ Test
1253
+ public void testRelatedInstanceAndPrototypePropNotAmbiguated () {
1254
+ test (
1255
+ lines (
1256
+ "class Foo {" , //
1257
+ " constructor() {" ,
1258
+ " this.y = 0;" ,
1259
+ " }" ,
1260
+ " x() {}" ,
1261
+ "}" ),
1262
+ lines (
1263
+ "class Foo {" , //
1264
+ " constructor() {" ,
1265
+ " this.b = 0;" ,
1266
+ " }" ,
1267
+ " a() {}" ,
1268
+ "}" ));
1269
+ }
1270
+
1271
+ @ Test
1272
+ public void testRelatedInstanceAndSuperclassPrototypePropNotAmbiguated () {
1273
+ test (
1274
+ lines (
1275
+ "class Foo {" , //
1276
+ " x() {}" ,
1277
+ "}" ,
1278
+ "class Bar extends Foo {" ,
1279
+ " constructor() {" ,
1280
+ " this.y = 0;" ,
1281
+ " }" ,
1282
+ "}" ),
1283
+ lines (
1284
+ "class Foo {" , //
1285
+ " a() {}" ,
1286
+ "}" ,
1287
+ "class Bar extends Foo {" ,
1288
+ " constructor() {" ,
1289
+ " this.b = 0;" ,
1290
+ " }" ,
1291
+ "}" ));
1292
+ }
1293
+
1252
1294
@ Test
1253
1295
public void testPropertiesWithTypesThatHaveBeenNarrowed () {
1254
1296
String js = lines (
You can’t perform that action at this time.
0 commit comments