Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Not specifying a type on a method override should not trigger an error #12

Closed
jacob314 opened this issue Dec 23, 2014 · 4 comments
Closed

Comments

@jacob314
Copy link
Contributor

Instead we should automatically use the type from the base class.

Repro

class LocaleDataException implements Exception {
  final String message;
  LocaleDataException(this.message);
   /* severe: InvalidMethodOverride */ toString() => "LocaleDataException: $message";
}
@vsmenon
Copy link
Contributor

vsmenon commented Jan 6, 2015

This will change the observable semantics. We could alternatively do a quick fix here instead since we have the info.

@sigmundch
Copy link
Contributor

(btw, this today is reported as an inferrable override)

@alan-knight
Copy link
Contributor

If you're going to force me to put an explicit return type on every toString() method, even if you add it for me, you're going to get a lot of complaining.

@vsmenon
Copy link
Contributor

vsmenon commented Aug 12, 2015

We now infer return types. Parameter types are left - closing this - please refer to #105

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants