From c3512e77c24b9c2b99cb18e5b5543d3159b49115 Mon Sep 17 00:00:00 2001 From: sunrabbit123 Date: Wed, 5 Jul 2023 22:54:36 +0900 Subject: [PATCH 1/4] asdf --- .../src/analyzer/generic/mod.rs | 31 ++++++++++++++++++- .../overloadResolution.error-diff.json | 4 --- .../overloadResolution.stats.rust-debug | 4 +-- ...loadResolutionConstructors.error-diff.json | 4 --- ...oadResolutionConstructors.stats.rust-debug | 4 +-- ...ntInferenceWithConstraints.error-diff.json | 8 ----- ...tInferenceWithConstraints.stats.rust-debug | 4 +-- .../conditionalTypes1.error-diff.json | 6 ++-- .../mapped/mappedTypeErrors.error-diff.json | 4 +-- .../mapped/mappedTypeErrors.stats.rust-debug | 4 +-- .../nonPrimitiveInGeneric.error-diff.json | 14 --------- .../nonPrimitiveInGeneric.stats.rust-debug | 4 +-- .../nonPrimitiveStrictNull.error-diff.json | 8 +---- .../nonPrimitiveStrictNull.stats.rust-debug | 4 +-- .../genericRestParameters1.error-diff.json | 4 --- .../genericRestParameters1.stats.rust-debug | 4 +-- ...ircularTypeofWithVarOrFunc.error-diff.json | 13 +++++--- ...dAndRecursiveConstraints2.stats.rust-debug | 2 +- ...AndIntersectionInference3.stats.rust-debug | 2 +- .../tests/tsc-stats.rust-debug | 6 ++-- 20 files changed, 62 insertions(+), 72 deletions(-) delete mode 100644 crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveInGeneric.error-diff.json diff --git a/crates/stc_ts_file_analyzer/src/analyzer/generic/mod.rs b/crates/stc_ts_file_analyzer/src/analyzer/generic/mod.rs index c2191f369e..17c9398108 100644 --- a/crates/stc_ts_file_analyzer/src/analyzer/generic/mod.rs +++ b/crates/stc_ts_file_analyzer/src/analyzer/generic/mod.rs @@ -6,7 +6,7 @@ use rnode::{Fold, FoldWith, VisitMut, VisitMutWith, VisitWith}; use stc_ts_ast_rnode::{RBindingIdent, RIdent, RNumber, RPat, RTsEntityName, RTsLit}; use stc_ts_errors::{ debug::{dump_type_as_string, force_dump_type_as_string, print_backtrace, print_type}, - DebugExt, + DebugExt, ErrorKind, }; use stc_ts_generics::{ expander::InferTypeResult, @@ -128,6 +128,11 @@ impl Analyzer<'_, '_> { if let Some(base) = base { for (param, type_param) in base.params.iter().zip(type_params) { info!("User provided `{:?} = {:?}`", type_param.name, param.clone()); + + if self.validate_generic_argument(span, param, type_param) { + break; + } + inferred.type_params.insert( type_param.name.clone(), InferenceInfo { @@ -2376,6 +2381,30 @@ impl Analyzer<'_, '_> { Ok(()) } + + /// ```ts + /// type A = 1; + /// A; + /// ``` + fn validate_generic_argument(&mut self, span: Span, param: &Type, type_param: &TypeParam) -> bool { + if let Some(tp) = &type_param.constraint { + if !param.span().is_dummy() && !param.is_type_param() { + if matches!(self.extends(span, param, tp, Default::default()), Some(false)) { + self.storage.report( + ErrorKind::NotSatisfyConstraint { + span: param.span(), + left: tp.clone(), + right: Box::new(param.clone()), + } + .into(), + ); + return true; + } + } + } + + false + } } fn array_elem_type(t: &Type) -> Option<&Type> { diff --git a/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolution.error-diff.json b/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolution.error-diff.json index 7b21137702..1f9b4d34fc 100644 --- a/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolution.error-diff.json +++ b/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolution.error-diff.json @@ -1,12 +1,8 @@ { "required_errors": { - "TS2344": 1, "TS2339": 1 }, "required_error_lines": { - "TS2344": [ - 81 - ], "TS2339": [ 91 ] diff --git a/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolution.stats.rust-debug b/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolution.stats.rust-debug index 13ac66ffd7..4074730ba8 100644 --- a/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolution.stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolution.stats.rust-debug @@ -1,6 +1,6 @@ Stats { - required_error: 2, - matched_error: 8, + required_error: 1, + matched_error: 9, extra_error: 0, panic: 0, } \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolutionConstructors.error-diff.json b/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolutionConstructors.error-diff.json index 87273b3f0a..07a5c81c04 100644 --- a/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolutionConstructors.error-diff.json +++ b/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolutionConstructors.error-diff.json @@ -1,12 +1,8 @@ { "required_errors": { - "TS2344": 1, "TS2339": 1 }, "required_error_lines": { - "TS2344": [ - 88 - ], "TS2339": [ 100 ] diff --git a/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolutionConstructors.stats.rust-debug b/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolutionConstructors.stats.rust-debug index 13ac66ffd7..4074730ba8 100644 --- a/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolutionConstructors.stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/overloadResolutionConstructors.stats.rust-debug @@ -1,6 +1,6 @@ Stats { - required_error: 2, - matched_error: 8, + required_error: 1, + matched_error: 9, extra_error: 0, panic: 0, } \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.error-diff.json b/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.error-diff.json index fca0f71b2b..ae93ce38eb 100644 --- a/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.error-diff.json +++ b/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.error-diff.json @@ -1,18 +1,10 @@ { "required_errors": { - "TS2344": 5, "TS2322": 1, "TS2403": 1, "TS2345": 1 }, "required_error_lines": { - "TS2344": [ - 11, - 16, - 17, - 35, - 49 - ], "TS2322": [ 33 ], diff --git a/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.stats.rust-debug b/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.stats.rust-debug index 66cf8a0936..c6c8a39c7a 100644 --- a/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.stats.rust-debug @@ -1,6 +1,6 @@ Stats { - required_error: 8, - matched_error: 7, + required_error: 3, + matched_error: 12, extra_error: 2, panic: 0, } \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/conformance/types/conditional/conditionalTypes1.error-diff.json b/crates/stc_ts_type_checker/tests/conformance/types/conditional/conditionalTypes1.error-diff.json index d1504430e1..539bf5b803 100644 --- a/crates/stc_ts_type_checker/tests/conformance/types/conditional/conditionalTypes1.error-diff.json +++ b/crates/stc_ts_type_checker/tests/conformance/types/conditional/conditionalTypes1.error-diff.json @@ -31,14 +31,14 @@ }, "extra_errors": { "TS2322": 1, - "TS0": 1 + "TS2344": 1 }, "extra_error_lines": { "TS2322": [ 21 ], - "TS0": [ - 323 + "TS2344": [ + 317 ] } } \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/conformance/types/mapped/mappedTypeErrors.error-diff.json b/crates/stc_ts_type_checker/tests/conformance/types/mapped/mappedTypeErrors.error-diff.json index 60c8f90643..57b15f4e3d 100644 --- a/crates/stc_ts_type_checker/tests/conformance/types/mapped/mappedTypeErrors.error-diff.json +++ b/crates/stc_ts_type_checker/tests/conformance/types/mapped/mappedTypeErrors.error-diff.json @@ -2,7 +2,7 @@ "required_errors": { "TS2313": 1, "TS2322": 4, - "TS2344": 7, + "TS2344": 5, "TS2403": 4, "TS2345": 4, "TS2536": 1, @@ -19,11 +19,9 @@ 139 ], "TS2344": [ - 25, 28, 29, 31, - 33, 36, 40 ], diff --git a/crates/stc_ts_type_checker/tests/conformance/types/mapped/mappedTypeErrors.stats.rust-debug b/crates/stc_ts_type_checker/tests/conformance/types/mapped/mappedTypeErrors.stats.rust-debug index 3dcce7e65b..0333ddafe9 100644 --- a/crates/stc_ts_type_checker/tests/conformance/types/mapped/mappedTypeErrors.stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/conformance/types/mapped/mappedTypeErrors.stats.rust-debug @@ -1,6 +1,6 @@ Stats { - required_error: 23, - matched_error: 4, + required_error: 21, + matched_error: 6, extra_error: 16, panic: 0, } \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveInGeneric.error-diff.json b/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveInGeneric.error-diff.json deleted file mode 100644 index 140e78e888..0000000000 --- a/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveInGeneric.error-diff.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "required_errors": { - "TS2344": 3 - }, - "required_error_lines": { - "TS2344": [ - 26, - 27, - 35 - ] - }, - "extra_errors": {}, - "extra_error_lines": {} -} \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveInGeneric.stats.rust-debug b/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveInGeneric.stats.rust-debug index 990eab48bc..2733dbe65c 100644 --- a/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveInGeneric.stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveInGeneric.stats.rust-debug @@ -1,6 +1,6 @@ Stats { - required_error: 3, - matched_error: 5, + required_error: 0, + matched_error: 8, extra_error: 0, panic: 0, } \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveStrictNull.error-diff.json b/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveStrictNull.error-diff.json index 9719e8367f..be19e16974 100644 --- a/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveStrictNull.error-diff.json +++ b/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveStrictNull.error-diff.json @@ -4,8 +4,7 @@ "TS2339": 1, "TS2531": 3, "TS2532": 3, - "TS2533": 1, - "TS2344": 3 + "TS2533": 1 }, "required_error_lines": { "TS2454": [ @@ -26,11 +25,6 @@ ], "TS2533": [ 34 - ], - "TS2344": [ - 53, - 54, - 55 ] }, "extra_errors": {}, diff --git a/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveStrictNull.stats.rust-debug b/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveStrictNull.stats.rust-debug index 53a400fda3..0eab5e3d3e 100644 --- a/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveStrictNull.stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/conformance/types/nonPrimitive/nonPrimitiveStrictNull.stats.rust-debug @@ -1,6 +1,6 @@ Stats { - required_error: 12, - matched_error: 6, + required_error: 9, + matched_error: 9, extra_error: 0, panic: 0, } \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/conformance/types/rest/genericRestParameters1.error-diff.json b/crates/stc_ts_type_checker/tests/conformance/types/rest/genericRestParameters1.error-diff.json index 5c01e090e2..4400a4b18d 100644 --- a/crates/stc_ts_type_checker/tests/conformance/types/rest/genericRestParameters1.error-diff.json +++ b/crates/stc_ts_type_checker/tests/conformance/types/rest/genericRestParameters1.error-diff.json @@ -1,12 +1,8 @@ { "required_errors": { - "TS2344": 1, "TS2322": 1 }, "required_error_lines": { - "TS2344": [ - 138 - ], "TS2322": [ 167 ] diff --git a/crates/stc_ts_type_checker/tests/conformance/types/rest/genericRestParameters1.stats.rust-debug b/crates/stc_ts_type_checker/tests/conformance/types/rest/genericRestParameters1.stats.rust-debug index e47bce7f3c..a5c3750ce9 100644 --- a/crates/stc_ts_type_checker/tests/conformance/types/rest/genericRestParameters1.stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/conformance/types/rest/genericRestParameters1.stats.rust-debug @@ -1,6 +1,6 @@ Stats { - required_error: 2, - matched_error: 0, + required_error: 1, + matched_error: 1, extra_error: 1, panic: 0, } \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.error-diff.json b/crates/stc_ts_type_checker/tests/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.error-diff.json index 66fcb3c563..438aeb2ede 100644 --- a/crates/stc_ts_type_checker/tests/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.error-diff.json +++ b/crates/stc_ts_type_checker/tests/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.error-diff.json @@ -23,21 +23,24 @@ ] }, "extra_errors": { - "TS2304": 5, - "TS2322": 3 + "TS2304": 3, + "TS2322": 3, + "TS2344": 2 }, "extra_error_lines": { "TS2304": [ 1, 5, - 9, - 18, - 25 + 9 ], "TS2322": [ 7, 20, 26 + ], + "TS2344": [ + 18, + 25 ] } } \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints2.stats.rust-debug b/crates/stc_ts_type_checker/tests/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints2.stats.rust-debug index c086b5ab15..27ba984132 100644 --- a/crates/stc_ts_type_checker/tests/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints2.stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints2.stats.rust-debug @@ -2,5 +2,5 @@ Stats { required_error: 0, matched_error: 0, extra_error: 0, - panic: 0, + panic: 1, } \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.stats.rust-debug b/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.stats.rust-debug index c086b5ab15..27ba984132 100644 --- a/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.stats.rust-debug @@ -2,5 +2,5 @@ Stats { required_error: 0, matched_error: 0, extra_error: 0, - panic: 0, + panic: 1, } \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/tsc-stats.rust-debug b/crates/stc_ts_type_checker/tests/tsc-stats.rust-debug index 9ba60c1e6e..8a674bcdc5 100644 --- a/crates/stc_ts_type_checker/tests/tsc-stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/tsc-stats.rust-debug @@ -1,6 +1,6 @@ Stats { - required_error: 3518, - matched_error: 6517, + required_error: 3502, + matched_error: 6533, extra_error: 769, - panic: 74, + panic: 76, } \ No newline at end of file From 3d6ef3af55beabe78a1c71fed0c7077c6a652b6c Mon Sep 17 00:00:00 2001 From: sunrabbit123 Date: Thu, 6 Jul 2023 01:51:17 +0900 Subject: [PATCH 2/4] asdf --- .../wrappedAndRecursiveConstraints2.stats.rust-debug | 2 +- .../unionAndIntersectionInference3.error-diff.json | 12 ++++++++++++ .../unionAndIntersectionInference3.stats.rust-debug | 4 ++-- .../stc_ts_type_checker/tests/tsc-stats.rust-debug | 4 ++-- 4 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.error-diff.json diff --git a/crates/stc_ts_type_checker/tests/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints2.stats.rust-debug b/crates/stc_ts_type_checker/tests/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints2.stats.rust-debug index 27ba984132..c086b5ab15 100644 --- a/crates/stc_ts_type_checker/tests/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints2.stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints2.stats.rust-debug @@ -2,5 +2,5 @@ Stats { required_error: 0, matched_error: 0, extra_error: 0, - panic: 1, + panic: 0, } \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.error-diff.json b/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.error-diff.json new file mode 100644 index 0000000000..face530a08 --- /dev/null +++ b/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.error-diff.json @@ -0,0 +1,12 @@ +{ + "required_errors": {}, + "required_error_lines": {}, + "extra_errors": { + "TS2344": 1 + }, + "extra_error_lines": { + "TS2344": [ + 74 + ] + } +} \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.stats.rust-debug b/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.stats.rust-debug index 27ba984132..0498397634 100644 --- a/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.stats.rust-debug @@ -1,6 +1,6 @@ Stats { required_error: 0, matched_error: 0, - extra_error: 0, - panic: 1, + extra_error: 1, + panic: 0, } \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/tsc-stats.rust-debug b/crates/stc_ts_type_checker/tests/tsc-stats.rust-debug index 8a674bcdc5..4a5c35932a 100644 --- a/crates/stc_ts_type_checker/tests/tsc-stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/tsc-stats.rust-debug @@ -1,6 +1,6 @@ Stats { required_error: 3502, matched_error: 6533, - extra_error: 769, - panic: 76, + extra_error: 770, + panic: 74, } \ No newline at end of file From 1a77ce2b75a9ace1105c8f3a5c815f73960cb662 Mon Sep 17 00:00:00 2001 From: sunrabbit123 Date: Thu, 6 Jul 2023 02:58:27 +0900 Subject: [PATCH 3/4] asdf --- .../stc_ts_file_analyzer/src/analyzer/generic/expander.rs | 7 ++----- crates/stc_ts_type_checker/tests/tsc-stats.rust-debug | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/stc_ts_file_analyzer/src/analyzer/generic/expander.rs b/crates/stc_ts_file_analyzer/src/analyzer/generic/expander.rs index 1ed5bc8ba2..6502f93401 100644 --- a/crates/stc_ts_file_analyzer/src/analyzer/generic/expander.rs +++ b/crates/stc_ts_file_analyzer/src/analyzer/generic/expander.rs @@ -6,7 +6,7 @@ use stc_ts_generics::{ ExpandGenericOpts, }; use stc_ts_type_ops::Fix; -use stc_ts_types::{Id, Interface, KeywordType, Readonly, TypeElement, TypeParam, TypeParamDecl, TypeParamInstantiation}; +use stc_ts_types::{Id, Index, Interface, KeywordType, Readonly, TypeElement, TypeParam, TypeParamDecl, TypeParamInstantiation}; use stc_utils::{cache::Freeze, dev_span, ext::SpanExt}; use swc_common::{Span, Spanned, TypeEq}; use swc_ecma_ast::*; @@ -241,10 +241,7 @@ impl Analyzer<'_, '_> { return self.extends(span, child, &parent, opts); } - _ => {} - } - - match parent { + Type::Index(Index { ty, .. }) if ty.is_any() && child.is_index() => return Some(true), Type::Keyword(KeywordType { kind: TsKeywordTypeKind::TsNullKeyword, .. diff --git a/crates/stc_ts_type_checker/tests/tsc-stats.rust-debug b/crates/stc_ts_type_checker/tests/tsc-stats.rust-debug index 4a5c35932a..b72223af99 100644 --- a/crates/stc_ts_type_checker/tests/tsc-stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/tsc-stats.rust-debug @@ -1,6 +1,6 @@ Stats { required_error: 3502, matched_error: 6533, - extra_error: 770, + extra_error: 769, panic: 74, } \ No newline at end of file From 1e5ce2dcef7fc8db14452e7fcda91cf79a61fa09 Mon Sep 17 00:00:00 2001 From: sunrabbit123 Date: Thu, 6 Jul 2023 03:00:09 +0900 Subject: [PATCH 4/4] asdf --- .../unionAndIntersectionInference3.error-diff.json | 12 ------------ .../unionAndIntersectionInference3.stats.rust-debug | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.error-diff.json diff --git a/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.error-diff.json b/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.error-diff.json deleted file mode 100644 index face530a08..0000000000 --- a/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.error-diff.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "required_errors": {}, - "required_error_lines": {}, - "extra_errors": { - "TS2344": 1 - }, - "extra_error_lines": { - "TS2344": [ - 74 - ] - } -} \ No newline at end of file diff --git a/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.stats.rust-debug b/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.stats.rust-debug index 0498397634..c086b5ab15 100644 --- a/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.stats.rust-debug +++ b/crates/stc_ts_type_checker/tests/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.stats.rust-debug @@ -1,6 +1,6 @@ Stats { required_error: 0, matched_error: 0, - extra_error: 1, + extra_error: 0, panic: 0, } \ No newline at end of file