J.R.
J.R.

Reputation: 6049

Has the Dart Compiler gone insane, or have I?

I have a class:

class PotentialSprite extends NPC {
  String helpPhrase = "default phrase ";
  num helpfulness = 0;
  bool armless = false;
  bool disaster = false;
  bool illegal = false; 
  PotentialSprite(String name, num id, Session session): super(name, id, session);
}

It works fine. I have a whole bunch of instances of this class as global variables in the same file.

I attempted to rename the PotentialSprite class with the refactoring menu, but discovered it did not rename the instances. I then did a "find and replace all", only to discover that suddenly PotentialSprite now has an "invalid" constructor.

Current testing shows that I can rename the instances one at a time, so long as I don't rename the next instance before the "Dart Analyzer" has finished.

This...can't be right. What is going on here? Is the error message correct, or is it obfuscating something I should really be looking for?

Edit:

Alright. It looks like a typo in one of the instances was the problem, though why it would make the constructor break is beyond me. Anybody have any clue?

Upvotes: 0

Views: 71

Answers (1)

Kevin Moore
Kevin Moore

Reputation: 6161

This sounds like an issue with the Analysis Server.

Please file an issue here https://github.com/dart-lang/sdk/issues/new and include a link to this discussion.

Thanks!

Upvotes: 1

Related Questions