mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
fix(semantic): report errors for missing class method impls (#8082)
This commit is contained in:
parent
de82492e97
commit
708e9cfac0
5 changed files with 550 additions and 81 deletions
|
|
@ -335,6 +335,13 @@ fn constructor_implementation_missing(span: Span) -> OxcDiagnostic {
|
|||
OxcDiagnostic::error("Constructor implementation is missing.").with_label(span)
|
||||
}
|
||||
|
||||
fn function_implementation_missing(span: Span) -> OxcDiagnostic {
|
||||
OxcDiagnostic::error(
|
||||
"Function implementation is missing or not immediately following the declaration.",
|
||||
)
|
||||
.with_label(span)
|
||||
}
|
||||
|
||||
pub fn check_class<'a>(class: &Class<'a>, ctx: &SemanticBuilder<'a>) {
|
||||
if !class.r#abstract {
|
||||
for elem in &class.body.body {
|
||||
|
|
@ -348,13 +355,24 @@ pub fn check_class<'a>(class: &Class<'a>, ctx: &SemanticBuilder<'a>) {
|
|||
if !class.r#declare && !ctx.in_declare_scope() {
|
||||
for (a, b) in class.body.body.iter().map(Some).chain(vec![None]).tuple_windows() {
|
||||
if let Some(ClassElement::MethodDefinition(a)) = a {
|
||||
if a.kind.is_constructor()
|
||||
if !a.r#type.is_abstract()
|
||||
&& !a.optional
|
||||
&& a.value.r#type == FunctionType::TSEmptyBodyFunctionExpression
|
||||
&& b.map_or(true, |b| {
|
||||
b.method_definition_kind().map_or(true, |kind| !kind.is_constructor())
|
||||
&& b.map_or(true, |b| match b {
|
||||
ClassElement::StaticBlock(_)
|
||||
| ClassElement::PropertyDefinition(_)
|
||||
| ClassElement::AccessorProperty(_)
|
||||
| ClassElement::TSIndexSignature(_) => true,
|
||||
ClassElement::MethodDefinition(b) => {
|
||||
b.key.static_name() != a.key.static_name()
|
||||
}
|
||||
})
|
||||
{
|
||||
ctx.error(constructor_implementation_missing(a.key.span()));
|
||||
if a.kind.is_constructor() {
|
||||
ctx.error(constructor_implementation_missing(a.key.span()));
|
||||
} else {
|
||||
ctx.error(function_implementation_missing(a.key.span()));
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ commit: 54a8389f
|
|||
|
||||
parser_babel Summary:
|
||||
AST Parsed : 2205/2218 (99.41%)
|
||||
Positive Passed: 2190/2218 (98.74%)
|
||||
Positive Passed: 2184/2218 (98.47%)
|
||||
Negative Passed: 1522/1634 (93.15%)
|
||||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-if-body/input.js
|
||||
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-if/input.js
|
||||
|
|
@ -304,6 +304,91 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc
|
|||
· ╰── It can not be redeclared here
|
||||
5 │ f();
|
||||
╰────
|
||||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names/input.ts
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names/input.ts:2:5]
|
||||
1 │ class C {
|
||||
2 │ public(): void;
|
||||
· ──────
|
||||
3 │ public static(): void;
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names/input.ts:3:12]
|
||||
2 │ public(): void;
|
||||
3 │ public static(): void;
|
||||
· ──────
|
||||
4 │ readonly = 0;
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names/input.ts:5:5]
|
||||
4 │ readonly = 0;
|
||||
5 │ async<T>(): void;
|
||||
· ─────
|
||||
6 │ abstract!:void;
|
||||
╰────
|
||||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names-babel-7/input.ts
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names-babel-7/input.ts:2:5]
|
||||
1 │ class C {
|
||||
2 │ public(): void;
|
||||
· ──────
|
||||
3 │ public static(): void;
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names-babel-7/input.ts:3:12]
|
||||
2 │ public(): void;
|
||||
3 │ public static(): void;
|
||||
· ──────
|
||||
4 │ readonly = 0;
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names-babel-7/input.ts:5:5]
|
||||
4 │ readonly = 0;
|
||||
5 │ async<T>(): void;
|
||||
· ─────
|
||||
6 │ abstract!:void;
|
||||
╰────
|
||||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/members-with-reserved-names/input.ts
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-reserved-names/input.ts:2:12]
|
||||
1 │ class C {
|
||||
2 │ public delete(): void;
|
||||
· ──────
|
||||
3 │ }
|
||||
╰────
|
||||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/method-no-body/input.ts
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/method-no-body/input.ts:3:5]
|
||||
2 │ f();
|
||||
3 │ f(): void;
|
||||
· ─
|
||||
4 │ }
|
||||
╰────
|
||||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/method-with-newline-without-body/input.ts
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/method-with-newline-without-body/input.ts:3:5]
|
||||
2 │ {
|
||||
3 │ m()
|
||||
· ─
|
||||
4 │ n()
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/method-with-newline-without-body/input.ts:4:5]
|
||||
3 │ m()
|
||||
4 │ n()
|
||||
· ─
|
||||
5 │ }
|
||||
╰────
|
||||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-override/input.ts
|
||||
|
||||
× Identifier `show` has already been declared
|
||||
|
|
@ -399,6 +484,15 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc
|
|||
· ╰── It can not be redeclared here
|
||||
8 │ }
|
||||
╰────
|
||||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/static/input.ts
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/static/input.ts:5:20]
|
||||
4 │ protected static f();
|
||||
5 │ private static f();
|
||||
· ─
|
||||
6 │ }
|
||||
╰────
|
||||
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/declare/eval/input.ts
|
||||
|
||||
× Cannot assign to 'eval' in strict mode
|
||||
|
|
@ -11600,6 +11694,14 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc
|
|||
× Getters and setters must have an implementation.
|
||||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare-accessor/input.ts:3:15]
|
||||
2 │ declare get foo()
|
||||
3 │ declare set foo(v)
|
||||
· ───
|
||||
4 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare-accessor/input.ts:3:15]
|
||||
2 │ declare get foo()
|
||||
3 │ declare set foo(v)
|
||||
· ───
|
||||
4 │ }
|
||||
|
|
|
|||
|
|
@ -2,15 +2,9 @@ commit: d85767ab
|
|||
|
||||
parser_typescript Summary:
|
||||
AST Parsed : 6494/6503 (99.86%)
|
||||
Positive Passed: 6483/6503 (99.69%)
|
||||
Negative Passed: 1249/5747 (21.73%)
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration13.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration15.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration21.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration22.ts
|
||||
Positive Passed: 6481/6503 (99.66%)
|
||||
Negative Passed: 1275/5747 (22.19%)
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration24.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration25.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ClassDeclaration9.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ExportAssignment7.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ExportAssignment8.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/FunctionDeclaration3.ts
|
||||
|
|
@ -335,8 +329,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/classStaticP
|
|||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/classTypeParametersInStatics.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/classUsedBeforeInitializedVariables.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/classWithMultipleBaseClasses.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/classWithOverloadImplementationOfWrongName.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/classWithOverloadImplementationOfWrongName2.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/cloduleSplitAcrossFiles.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/cloduleStaticMembers.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/cloduleTest2.ts
|
||||
|
|
@ -487,7 +479,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/crashInYield
|
|||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/crashInsourcePropertyIsRelatableToTargetProperty.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/crashIntypeCheckInvocationExpression.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/crashIntypeCheckObjectCreationExpression.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/crashOnMethodSignatures.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/crashRegressionTest.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/dataViewConstructor.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/declFileEmitDeclarationOnlyError1.ts
|
||||
|
|
@ -903,7 +894,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/functionOver
|
|||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/functionOverloads40.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/functionOverloads41.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/functionOverloads5.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/functionOverloadsOutOfOrder.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/functionParameterArityMismatch.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/functionSignatureAssignmentCompat1.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/functionToFunctionWithPropError.ts
|
||||
|
|
@ -1086,7 +1076,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/incompatible
|
|||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/incompatibleExports2.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/incompatibleGenericTypes.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/incompatibleTypes.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/incorrectClassOverloadChain.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/incorrectNumberOfTypeArgumentsDuringErrorReporting.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/incorrectRecursiveMappedTypeConstraint.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/incrementOnTypeParameter.ts
|
||||
|
|
@ -1107,7 +1096,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/indexedAcces
|
|||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/indexedAccessRelation.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/indexedAccessWithFreshObjectLiteral.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/indexedAccessWithVariableElement.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/indexer2A.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/indexerConstraints.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/indirectDiscriminantAndExcessProperty.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/indirectSelfReference.ts
|
||||
|
|
@ -1390,7 +1378,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/mismatchedEx
|
|||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/mismatchedGenericArguments1.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/missingCommaInTemplateStringsArray.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/missingDomElements.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/missingFunctionImplementation.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/missingFunctionImplementation2.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/missingMemberErrorHasShortPath.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/missingPropertiesOfClassExpression.ts
|
||||
|
|
@ -1656,7 +1643,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/overloadingO
|
|||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/overloadsAndTypeArgumentArityErrors.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/overloadsInDifferentContainersDisagreeOnAmbient.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/overloadsWithComputedNames.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/overloadsWithProvisionalErrors.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/overridingPrivateStaticMembers.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/overshifts.ts
|
||||
|
|
@ -1800,7 +1786,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/recursiveRes
|
|||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/recursiveTupleTypeInference.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/recursiveTypeComparison2.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/recursiveTypeParameterConstraintReferenceLacksTypeArgs.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/recursiveTypeRelations.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/recursivelyExpandingUnionNoStackoverflow.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/redefineArray.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/reexportMissingDefault.ts
|
||||
|
|
@ -2352,7 +2337,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/c
|
|||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInheritance2.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations1.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMixedWithModifiers.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractOverloads.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractOverrideWithAbstract.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractProperties.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractSingleLineDecl.ts
|
||||
|
|
@ -2519,7 +2503,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/p
|
|||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/propertyMemberDeclarations/initializerReferencingConstructorParameters.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/instanceMemberAssignsToClassPrototype.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPrivateOverloads.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticMemberAssignsToConstructorFunctionMembers.ts
|
||||
|
|
@ -2658,7 +2641,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/es6/Symbo
|
|||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/es6/Symbols/symbolProperty36.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/es6/Symbols/symbolProperty39.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/es6/Symbols/symbolProperty42.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/es6/Symbols/symbolProperty43.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/es6/Symbols/symbolProperty44.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/es6/Symbols/symbolProperty46.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/es6/Symbols/symbolProperty47.ts
|
||||
|
|
@ -3720,23 +3702,16 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ec
|
|||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration1.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration12.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration13.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration15.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration18.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration2.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration21.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration22.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration24.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration25.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration3.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration4.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration5.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration6.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration7.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration9.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts
|
||||
|
|
@ -3939,7 +3914,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ec
|
|||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/parserUsingConstructorAsIdentifier.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript5/parservoidInQualifiedName2.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts
|
||||
Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts
|
||||
|
|
@ -4791,6 +4765,24 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/moduleResolut
|
|||
· ▲
|
||||
╰────
|
||||
help: Try insert a semicolon here
|
||||
Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/nonjsExtensions/declarationFileForHtmlFileWithinDeclarationFile.ts
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/nonjsExtensions/declarationFileForHtmlFileWithinDeclarationFile.ts:11:5]
|
||||
10 │ export class HTML5Element extends HTMLElement {
|
||||
11 │ connectedCallback(): void;
|
||||
· ─────────────────
|
||||
12 │ }
|
||||
╰────
|
||||
Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/nonjsExtensions/declarationFileForHtmlImport.ts
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/nonjsExtensions/declarationFileForHtmlImport.ts:11:5]
|
||||
10 │ export class HTML5Element extends HTMLElement {
|
||||
11 │ connectedCallback(): void;
|
||||
· ─────────────────
|
||||
12 │ }
|
||||
╰────
|
||||
Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/plainJSRedeclare3.ts
|
||||
|
||||
× Identifier `orbitol` has already been declared
|
||||
|
|
@ -4826,6 +4818,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
3 │ foo();
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/ClassDeclaration10.ts:3:4]
|
||||
2 │ constructor();
|
||||
3 │ foo();
|
||||
· ───
|
||||
4 │ }
|
||||
╰────
|
||||
|
||||
× Constructor implementation is missing.
|
||||
╭─[typescript/tests/cases/compiler/ClassDeclaration11.ts:2:4]
|
||||
1 │ class C {
|
||||
|
|
@ -4834,6 +4834,22 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
3 │ foo() { }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/ClassDeclaration13.ts:2:4]
|
||||
1 │ class C {
|
||||
2 │ foo();
|
||||
· ───
|
||||
3 │ bar() { }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/ClassDeclaration14.ts:2:4]
|
||||
1 │ class C {
|
||||
2 │ foo();
|
||||
· ───
|
||||
3 │ constructor();
|
||||
╰────
|
||||
|
||||
× Constructor implementation is missing.
|
||||
╭─[typescript/tests/cases/compiler/ClassDeclaration14.ts:3:4]
|
||||
2 │ foo();
|
||||
|
|
@ -4842,6 +4858,46 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
4 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/ClassDeclaration15.ts:2:4]
|
||||
1 │ class C {
|
||||
2 │ foo();
|
||||
· ───
|
||||
3 │ constructor() { }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/ClassDeclaration21.ts:2:5]
|
||||
1 │ class C {
|
||||
2 │ 0();
|
||||
· ─
|
||||
3 │ 1() { }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/ClassDeclaration22.ts:2:5]
|
||||
1 │ class C {
|
||||
2 │ "foo"();
|
||||
· ─────
|
||||
3 │ "bar"() { }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/ClassDeclaration25.ts:6:5]
|
||||
5 │ class List<U> implements IList<U> {
|
||||
6 │ data(): U;
|
||||
· ────
|
||||
7 │ next(): string;
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/ClassDeclaration25.ts:7:5]
|
||||
6 │ data(): U;
|
||||
7 │ next(): string;
|
||||
· ────
|
||||
8 │ }
|
||||
╰────
|
||||
|
||||
× TS(1248): A class member cannot have the 'const' keyword.
|
||||
╭─[typescript/tests/cases/compiler/ClassDeclaration26.ts:2:18]
|
||||
1 │ class C {
|
||||
|
|
@ -4868,6 +4924,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
3 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/ClassDeclaration9.ts:2:4]
|
||||
1 │ class C {
|
||||
2 │ foo();
|
||||
· ───
|
||||
3 │ }
|
||||
╰────
|
||||
|
||||
× TS(1248): A class member cannot have the 'const' keyword.
|
||||
╭─[typescript/tests/cases/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.ts:2:16]
|
||||
1 │ class AtomicNumbers {
|
||||
|
|
@ -4984,6 +5048,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
16 │ get concreteWithNoBody(): string;
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/abstractPropertyNegative.ts:16:9]
|
||||
15 │ abstract notAllowed: string;
|
||||
16 │ get concreteWithNoBody(): string;
|
||||
· ──────────────────
|
||||
17 │ }
|
||||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[typescript/tests/cases/compiler/accessorBodyInTypeContext.ts:2:15]
|
||||
1 │ type A = {
|
||||
|
|
@ -6009,6 +6081,30 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
2 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/classWithOverloadImplementationOfWrongName.ts:3:5]
|
||||
2 │ foo(): string;
|
||||
3 │ foo(x): number;
|
||||
· ───
|
||||
4 │ bar(x): any { }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/classWithOverloadImplementationOfWrongName2.ts:2:5]
|
||||
1 │ class C {
|
||||
2 │ foo(): string;
|
||||
· ───
|
||||
3 │ bar(x): any { }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/classWithOverloadImplementationOfWrongName2.ts:4:5]
|
||||
3 │ bar(x): any { }
|
||||
4 │ foo(x): number;
|
||||
· ───
|
||||
5 │ }
|
||||
╰────
|
||||
|
||||
× Cannot assign to 'arguments' in strict mode
|
||||
╭─[typescript/tests/cases/compiler/collisionArgumentsClassConstructor.ts:3:31]
|
||||
2 │ class c1 {
|
||||
|
|
@ -6995,6 +7091,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
293 │ class interface { }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/crashOnMethodSignatures.ts:2:5]
|
||||
1 │ class A {
|
||||
2 │ a(completed: () => any): void;
|
||||
· ─
|
||||
3 │ }
|
||||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[typescript/tests/cases/compiler/createArray.ts:1:19]
|
||||
1 │ var na=new number[];
|
||||
|
|
@ -8168,6 +8272,22 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
3 │ function f() {
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/functionOverloadsOutOfOrder.ts:6:13]
|
||||
5 │ }
|
||||
6 │ private foo(s: string): string;
|
||||
· ───
|
||||
7 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/functionOverloadsOutOfOrder.ts:14:13]
|
||||
13 │ private foo(s: string): string;
|
||||
14 │ private foo(n: number): string;
|
||||
· ───
|
||||
15 │ }
|
||||
╰────
|
||||
|
||||
× Expected `,` but found `var`
|
||||
╭─[typescript/tests/cases/compiler/functionTypesLackingReturnTypes.ts:6:1]
|
||||
5 │ // Error (no '=>')
|
||||
|
|
@ -8312,6 +8432,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
2 │ var x = tt;
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/incorrectClassOverloadChain.ts:3:5]
|
||||
2 │ foo(): string;
|
||||
3 │ foo(x): number;
|
||||
· ───
|
||||
4 │ x = 1;
|
||||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[typescript/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts:4:16]
|
||||
3 │ [x]: string;
|
||||
|
|
@ -8385,6 +8513,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
· ─
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/indexer2A.ts:4:5]
|
||||
3 │ // Decided to enforce a semicolon after declarations
|
||||
4 │ hasOwnProperty(objectId: number): boolean
|
||||
· ──────────────
|
||||
5 │ [objectId: number]: IHeapObjectProperty[]
|
||||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[typescript/tests/cases/compiler/indexerAsOptional.ts:3:10]
|
||||
2 │ //Index signatures can't be optional
|
||||
|
|
@ -9385,6 +9521,70 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
3 │ while( (a2 > 0) && a1
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/missingFunctionImplementation.ts:2:3]
|
||||
1 │ export class C1 {
|
||||
2 │ m(): void;
|
||||
· ─
|
||||
3 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/missingFunctionImplementation.ts:7:3]
|
||||
6 │ export class C2 {
|
||||
7 │ m(): void;
|
||||
· ─
|
||||
8 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/missingFunctionImplementation.ts:15:3]
|
||||
14 │ m(a, b);
|
||||
15 │ m(a);
|
||||
· ─
|
||||
16 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/missingFunctionImplementation.ts:21:10]
|
||||
20 │ class C4 {
|
||||
21 │ static m(a): void;
|
||||
· ─
|
||||
22 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/missingFunctionImplementation.ts:27:10]
|
||||
26 │ static m(a): void;
|
||||
27 │ static m(): void;
|
||||
· ─
|
||||
28 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/missingFunctionImplementation.ts:32:10]
|
||||
31 │ class C6 {
|
||||
32 │ static m(): void;
|
||||
· ─
|
||||
33 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/missingFunctionImplementation.ts:40:10]
|
||||
39 │ static m(a): void;
|
||||
40 │ static m(): void;
|
||||
· ─
|
||||
41 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/missingFunctionImplementation.ts:48:10]
|
||||
47 │ static m(a): void;
|
||||
48 │ static m(a, b): void;
|
||||
· ─
|
||||
49 │ }
|
||||
╰────
|
||||
|
||||
× The only valid meta property for new is new.target
|
||||
╭─[typescript/tests/cases/compiler/misspelledNewMetaProperty.ts:1:16]
|
||||
1 │ function foo(){new.targ}
|
||||
|
|
@ -10238,6 +10438,38 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
2 │ static test()
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/overloadsWithComputedNames.ts:3:6]
|
||||
2 │ class Person {
|
||||
3 │ ["B"](a: number): string;
|
||||
· ───
|
||||
4 │ ["A"](a: string|number): number | string {
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/overloadsWithComputedNames.ts:14:6]
|
||||
13 │ class C {
|
||||
14 │ ["foo"](): void
|
||||
· ─────
|
||||
15 │ ["bar"](): void;
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/overloadsWithComputedNames.ts:15:6]
|
||||
14 │ ["foo"](): void
|
||||
15 │ ["bar"](): void;
|
||||
· ─────
|
||||
16 │ ["foo"]() {
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/overloadsWithComputedNames.ts:52:6]
|
||||
51 │ class C3 {
|
||||
52 │ [1](): void; // should error
|
||||
· ─
|
||||
53 │ [2](): void;
|
||||
╰────
|
||||
|
||||
× Identifier `fnOverload` has already been declared
|
||||
╭─[typescript/tests/cases/compiler/overloadsWithinClasses.ts:3:12]
|
||||
2 │
|
||||
|
|
@ -10828,6 +11060,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
6 │
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/compiler/recursiveTypeRelations.ts:8:5]
|
||||
7 │ class Query<A extends Attributes<keyof A>> {
|
||||
8 │ multiply<B extends Attributes<keyof B>>(x: B): Query<A & B>;
|
||||
· ────────
|
||||
9 │ }
|
||||
╰────
|
||||
|
||||
× Identifier `e` has already been declared
|
||||
╭─[typescript/tests/cases/compiler/redeclareParameterInCatchBlock.ts:3:9]
|
||||
2 │
|
||||
|
|
@ -13835,6 +14075,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
9 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations2.ts:46:5]
|
||||
45 │ abstract nom(): boolean;
|
||||
46 │ nom(x : number): boolean; // error -- use of modifier abstract must match on all overloads.
|
||||
· ───
|
||||
47 │ }
|
||||
╰────
|
||||
|
||||
× TS(1244): Abstract methods can only appear within an abstract class.
|
||||
╭─[typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations2.ts:50:14]
|
||||
49 │ class H { // error -- not declared abstract
|
||||
|
|
@ -13923,6 +14171,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
3 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractOverloads.ts:15:5]
|
||||
14 │
|
||||
15 │ qux();
|
||||
· ───
|
||||
16 │ }
|
||||
╰────
|
||||
|
||||
× TS(1244): Abstract methods can only appear within an abstract class.
|
||||
╭─[typescript/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractUsingAbstractMethods2.ts:2:14]
|
||||
1 │ class A {
|
||||
|
|
@ -15283,6 +15539,38 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
12 │ };
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts:3:12]
|
||||
2 │ foo();
|
||||
3 │ static foo(); // error
|
||||
· ───
|
||||
4 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts:8:5]
|
||||
7 │ static foo();
|
||||
8 │ foo(); // error
|
||||
· ───
|
||||
9 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts:13:12]
|
||||
12 │ foo(x: T);
|
||||
13 │ static foo(x: number); // error
|
||||
· ───
|
||||
14 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts:18:5]
|
||||
17 │ static foo(x: number);
|
||||
18 │ foo(x: T); // error
|
||||
· ───
|
||||
19 │ }
|
||||
╰────
|
||||
|
||||
× Identifier `x` has already been declared
|
||||
╭─[typescript/tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts:2:5]
|
||||
1 │ class C {
|
||||
|
|
@ -15601,6 +15889,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
9 │ const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/es6/Symbols/symbolProperty43.ts:3:6]
|
||||
2 │ [Symbol.iterator](x: string): string;
|
||||
3 │ [Symbol.iterator](x: number): number;
|
||||
· ───────────────
|
||||
4 │ }
|
||||
╰────
|
||||
|
||||
× Line terminator not permitted before arrow
|
||||
╭─[typescript/tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts:2:5]
|
||||
1 │ var f1 = ()
|
||||
|
|
@ -20281,6 +20577,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
3 │ foo();
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration10.ts:3:4]
|
||||
2 │ constructor();
|
||||
3 │ foo();
|
||||
· ───
|
||||
4 │ }
|
||||
╰────
|
||||
|
||||
× Constructor implementation is missing.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration11.ts:2:4]
|
||||
1 │ class C {
|
||||
|
|
@ -20289,6 +20593,22 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
3 │ foo() { }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration13.ts:2:4]
|
||||
1 │ class C {
|
||||
2 │ foo();
|
||||
· ───
|
||||
3 │ bar() { }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration14.ts:2:4]
|
||||
1 │ class C {
|
||||
2 │ foo();
|
||||
· ───
|
||||
3 │ constructor();
|
||||
╰────
|
||||
|
||||
× Constructor implementation is missing.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration14.ts:3:4]
|
||||
2 │ foo();
|
||||
|
|
@ -20297,6 +20617,46 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
4 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration15.ts:2:4]
|
||||
1 │ class C {
|
||||
2 │ foo();
|
||||
· ───
|
||||
3 │ constructor() { }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration21.ts:2:5]
|
||||
1 │ class C {
|
||||
2 │ 0();
|
||||
· ─
|
||||
3 │ 1() { }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration22.ts:2:5]
|
||||
1 │ class C {
|
||||
2 │ "foo"();
|
||||
· ─────
|
||||
3 │ "bar"() { }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration25.ts:6:5]
|
||||
5 │ class List<U> implements IList<U> {
|
||||
6 │ data(): U;
|
||||
· ────
|
||||
7 │ next(): string;
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration25.ts:7:5]
|
||||
6 │ data(): U;
|
||||
7 │ next(): string;
|
||||
· ────
|
||||
8 │ }
|
||||
╰────
|
||||
|
||||
× Constructor implementation is missing.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration8.ts:2:3]
|
||||
1 │ class C {
|
||||
|
|
@ -20305,6 +20665,22 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
3 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration9.ts:2:4]
|
||||
1 │ class C {
|
||||
2 │ foo();
|
||||
· ───
|
||||
3 │ }
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts:2:5]
|
||||
1 │ class C {
|
||||
2 │ [e]();
|
||||
· ─
|
||||
3 │ }
|
||||
╰────
|
||||
|
||||
× TS(1164): Computed property names are not allowed in enums.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName6.ts:2:4]
|
||||
1 │ enum E {
|
||||
|
|
@ -22482,6 +22858,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/salsa/private
|
|||
· ─
|
||||
╰────
|
||||
|
||||
× Function implementation is missing or not immediately following the declaration.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts:2:5]
|
||||
1 │ class C {
|
||||
2 │ [e]();
|
||||
· ─
|
||||
3 │ }
|
||||
╰────
|
||||
|
||||
× TS(1164): Computed property names are not allowed in enums.
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName16.ts:2:4]
|
||||
1 │ enum E {
|
||||
|
|
|
|||
|
|
@ -354,19 +354,17 @@ after transform: ["T", "X"]
|
|||
rebuilt : []
|
||||
|
||||
tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names/input.ts
|
||||
semantic error: Scope children mismatch:
|
||||
after transform: ScopeId(1): [ScopeId(2), ScopeId(3), ScopeId(4)]
|
||||
rebuilt : ScopeId(1): []
|
||||
semantic error: Function implementation is missing or not immediately following the declaration.
|
||||
Function implementation is missing or not immediately following the declaration.
|
||||
Function implementation is missing or not immediately following the declaration.
|
||||
|
||||
tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names-babel-7/input.ts
|
||||
semantic error: Scope children mismatch:
|
||||
after transform: ScopeId(1): [ScopeId(2), ScopeId(3), ScopeId(4)]
|
||||
rebuilt : ScopeId(1): []
|
||||
semantic error: Function implementation is missing or not immediately following the declaration.
|
||||
Function implementation is missing or not immediately following the declaration.
|
||||
Function implementation is missing or not immediately following the declaration.
|
||||
|
||||
tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/members-with-reserved-names/input.ts
|
||||
semantic error: Scope children mismatch:
|
||||
after transform: ScopeId(1): [ScopeId(2)]
|
||||
rebuilt : ScopeId(1): []
|
||||
semantic error: Function implementation is missing or not immediately following the declaration.
|
||||
|
||||
tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/method-computed/input.ts
|
||||
semantic error: Scope children mismatch:
|
||||
|
|
@ -377,14 +375,11 @@ after transform: ["Symbol"]
|
|||
rebuilt : []
|
||||
|
||||
tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/method-no-body/input.ts
|
||||
semantic error: Scope children mismatch:
|
||||
after transform: ScopeId(1): [ScopeId(2), ScopeId(3)]
|
||||
rebuilt : ScopeId(1): []
|
||||
semantic error: Function implementation is missing or not immediately following the declaration.
|
||||
|
||||
tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/method-with-newline-without-body/input.ts
|
||||
semantic error: Scope children mismatch:
|
||||
after transform: ScopeId(1): [ScopeId(2), ScopeId(3)]
|
||||
rebuilt : ScopeId(1): []
|
||||
semantic error: Function implementation is missing or not immediately following the declaration.
|
||||
Function implementation is missing or not immediately following the declaration.
|
||||
|
||||
tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-accessors/input.ts
|
||||
semantic error: Scope children mismatch:
|
||||
|
|
@ -416,9 +411,7 @@ Identifier `x` has already been declared
|
|||
Identifier `x` has already been declared
|
||||
|
||||
tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/static/input.ts
|
||||
semantic error: Scope children mismatch:
|
||||
after transform: ScopeId(1): [ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5)]
|
||||
rebuilt : ScopeId(1): []
|
||||
semantic error: Function implementation is missing or not immediately following the declaration.
|
||||
|
||||
tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/const/initializer-ambient-context/input.ts
|
||||
semantic error: Bindings mismatch:
|
||||
|
|
|
|||
|
|
@ -46350,38 +46350,10 @@ after transform: ["const"]
|
|||
rebuilt : []
|
||||
|
||||
tasks/coverage/typescript/tests/cases/conformance/nonjsExtensions/declarationFileForHtmlFileWithinDeclarationFile.ts
|
||||
semantic error: Bindings mismatch:
|
||||
after transform: ScopeId(0): ["HTML5Element", "blogPost", "doc"]
|
||||
rebuilt : ScopeId(0): ["HTML5Element", "blogPost"]
|
||||
Scope children mismatch:
|
||||
after transform: ScopeId(1): [ScopeId(2)]
|
||||
rebuilt : ScopeId(1): []
|
||||
Reference symbol mismatch for "doc":
|
||||
after transform: SymbolId(0) "doc"
|
||||
rebuilt : <None>
|
||||
Reference flags mismatch for "doc":
|
||||
after transform: ReferenceId(1): ReferenceFlags(Read)
|
||||
rebuilt : ReferenceId(0): ReferenceFlags(Read | Type)
|
||||
Unresolved references mismatch:
|
||||
after transform: ["Document", "Element", "HTMLElement"]
|
||||
rebuilt : ["HTMLElement", "doc"]
|
||||
semantic error: Function implementation is missing or not immediately following the declaration.
|
||||
|
||||
tasks/coverage/typescript/tests/cases/conformance/nonjsExtensions/declarationFileForHtmlImport.ts
|
||||
semantic error: Bindings mismatch:
|
||||
after transform: ScopeId(0): ["HTML5Element", "blogPost", "doc"]
|
||||
rebuilt : ScopeId(0): ["HTML5Element", "blogPost"]
|
||||
Scope children mismatch:
|
||||
after transform: ScopeId(1): [ScopeId(2)]
|
||||
rebuilt : ScopeId(1): []
|
||||
Reference symbol mismatch for "doc":
|
||||
after transform: SymbolId(0) "doc"
|
||||
rebuilt : <None>
|
||||
Reference flags mismatch for "doc":
|
||||
after transform: ReferenceId(1): ReferenceFlags(Read)
|
||||
rebuilt : ReferenceId(0): ReferenceFlags(Read | Type)
|
||||
Unresolved references mismatch:
|
||||
after transform: ["Document", "Element", "HTMLElement"]
|
||||
rebuilt : ["HTMLElement", "doc"]
|
||||
semantic error: Function implementation is missing or not immediately following the declaration.
|
||||
|
||||
tasks/coverage/typescript/tests/cases/conformance/nonjsExtensions/declarationFileForJsonImport.ts
|
||||
semantic error: Bindings mismatch:
|
||||
|
|
|
|||
Loading…
Reference in a new issue