Skip to content

Commit 841eb8a

Browse files
blicklycopybara-github
authored andcommitted
Remove a few bad missingSourcesWarnings
PiperOrigin-RevId: 601198653
1 parent 09babf4 commit 841eb8a

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

src/com/google/javascript/jscomp/DiagnosticGroups.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -428,15 +428,12 @@ public static DiagnosticGroup forName(String name) {
428428
REPORT_UNKNOWN_TYPES,
429429
UNDEFINED_VARIABLES,
430430
MISSING_PROVIDE,
431-
DiagnosticGroup.forType(FunctionTypeBuilder.RESOLVED_TAG_EMPTY),
432431
DiagnosticGroup.forType(MISSING_MODULE_OR_PROVIDE),
433432
MISSING_PROPERTIES,
434433
// triggered by typedefs with missing types
435434
DUPLICATE_VARS,
436435
// caused by a define depending on another define that's missing
437-
DiagnosticGroup.forType(ProcessDefines.INVALID_DEFINE_VALUE),
438-
// ES Module imports of files not reachable from this partial program.
439-
DiagnosticGroup.forType(ModuleLoader.LOAD_WARNING));
436+
DiagnosticGroup.forType(ProcessDefines.INVALID_DEFINE_VALUE));
440437

441438
public static final DiagnosticGroup STRICT_REQUIRES =
442439
DiagnosticGroups.registerDeprecatedGroup("legacyGoogScopeRequire");

test/com/google/javascript/jscomp/PartialCompilationTest.java

-17
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
import com.google.common.base.Joiner;
2424
import com.google.common.collect.ImmutableList;
25-
import com.google.javascript.rhino.jstype.FunctionType;
2625
import com.google.javascript.rhino.jstype.JSType;
2726
import com.google.javascript.rhino.jstype.NamedType;
2827
import com.google.javascript.rhino.jstype.NoType;
@@ -204,20 +203,4 @@ public void testUnresolvedGenerics_defined() throws Exception {
204203
" useMissing(new some.thing.Missing());",
205204
"}");
206205
}
207-
208-
@Test
209-
public void testUnresolvedBaseClassDoesNotHideFields() throws Exception {
210-
assertPartialCompilationSucceeds(
211-
"/** @constructor @extends {MissingBase} */",
212-
"var Klass = function () {",
213-
" /** @type {string} */",
214-
" this.foo;",
215-
"};");
216-
TypedVar x = compiler.getTopScope().getSlot("Klass");
217-
JSType type = x.getType();
218-
assertThat(type.isFunctionType()).isTrue();
219-
220-
FunctionType fType = (FunctionType) type;
221-
assertThat(fType.getTypeOfThis().hasProperty("foo")).isTrue();
222-
}
223206
}

0 commit comments

Comments
 (0)