question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use related error spans for "implement abstract class" errors

See original GitHub issue

From https://github.com/microsoft/vscode/issues/78048

TypeScript Version: 3.6.0-dev.20190810

Search Terms:

  • abstract class
  • related error spans
  • diagnostics

Problem For the TypeScript:

abstract class A {
	abstract b(): void;
	abstract c(): void;
}

class B extends A { }

The typescript server currently generates two errors on B, one for b not being implemented and one for c not being implemented.

Having two errors causes VS Code to show a fix all... quick fix even though the single implement abstract class quick fix will resolve both errors. See https://github.com/microsoft/vscode/issues/78048

Proposal Instead of generating two errors in this case, generate a single, generic diagnostic that states something like: B does not implement all abstract members of A and on that diagnostic return related spans that state specifically which members are not implemented (b and c).

Related Issues:

/cc @DanielRosenwasser

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
DanielRosenwassercommented, Nov 12, 2019

Go for it! Start at the checker to consolidate the error messages, and then work within src/services/codefixes.

0reactions
DanielRosenwassercommented, Feb 25, 2022

Thanks @FlyingPumba!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix an issue with an abstract class error - Stack Overflow
The problem is here: actionPerformed(ActionEvent); { objButton1.addActionListener(this); objButton2.addActionListener(this); if(e.
Read more >
Error: The type must implement the inherited abstract method
I am getting the error, The type must implement the inherited abstract method, with the method runProcess() in the class ProcessRunner.
Read more >
Handling Service Errors and Exceptions - Microsoft Learn
Here are some tips to handle common service errors that you may encounter. For a comprehensive list of Bing Ads API error codes,...
Read more >
Java Custom Instrumentation - Datadog Docs
Implement the OpenTracing standard with the Datadog Java APM tracer. ... associated with one of your spans, set the error tag on the...
Read more >
Types of Unintended Consequences Related to Computerized ...
Using a card sort method, the authors developed a categorization scheme for ... not uniformly errors or mistakes: they are simply surprises that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found