Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VM doesn't recognize implicit class interfaces #1971

Closed
sethladd opened this issue Mar 4, 2012 · 8 comments
Closed

VM doesn't recognize implicit class interfaces #1971

sethladd opened this issue Mar 4, 2012 · 8 comments
Labels

Comments

@sethladd
Copy link
Contributor

sethladd commented Mar 4, 2012

This example works in Dartboard:

class Duck {
  quack() => 'complicated enterprise n-tier quack';
}

class MockDuck implements Duck {
  quack() => 'quack for testing';
}

main() {
  var mock = new MockDuck();
  print(mock is Duck); // true!
}

however, when executed via the VM, this error is generated:

Error: line 5 pos 7: class 'Duck' is used where an interface is expected
class MockDuck implements Duck {

(The Editor doesn't indicate any warnings)

Not sure if it's a Dartboard error or a VM error.

@iposva-google
Copy link
Contributor

Removed the owner.

@iposva-google
Copy link
Contributor

Set owner to @mhausner.
Added Accepted label.

@iposva-google
Copy link
Contributor

Issue #1977 has been merged into this issue.

@DartBot
Copy link

DartBot commented Apr 9, 2012

This comment was originally written by @mhausner


Issue #2496 has been merged into this issue.

@DartBot
Copy link

DartBot commented Apr 16, 2012

This comment was originally written by @mhausner


Fixed in CL 6607


Added Fixed label.

@DartBot
Copy link

DartBot commented Apr 18, 2012

This comment was originally written by shiv.shivshan...@gmail.com


Is it extends or implements. I see a different notation in language tour section.

class SmartTelevision extends Television

@sethladd
Copy link
Contributor Author

Shiv is talking about http://www.dartlang.org/language-tour/#classes

Shiv, this bug is talking about something different. The Television example in the Language Tour is referring to classical class inheritance. Sorry for the confusion.

@sethladd
Copy link
Contributor Author

Hi Shiv,

The best place for questions about the language would be our mailing list: https://groups.google.com/a/dartlang.org/forum/#!forum/misc

Hope to see you there,
Seth

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants