The larger question here is how this fits in with VM and dart2js behavior. It is all too easy to see how, at some point, someone decides to rely on the fact that abstract classes are never instantiated without realizing that reflection could violate that assumption. This can lead to all kinds of problems, and that is one reason we try to stay consistent language semantics.
>> I'm curious about the purpose of abstract classes in a language where a concrete class can have abstract members.
Just tested, it works.class A {abstract foo();}
But I am confused because Dart Editor display this warning in two colors, Red and yellow colors used.1. In red color "Members of classes cannot be declared to be 'abstract'".
2. In yellow "'foo' must have a method body because 'A' is not abstract".
I not understand the following.1. Why different colors on the same "static warning"?
2. Is the first warning more important the second?
3 Why both not in red color?4 Why both not in yellow color?Red color can means potential error (may be fatal).Yellow color can means potential mistake (may be not fatal).Is this means that the1. "Members of classes cannot be declared to be 'abstract'" is fatal2. "'foo' must have a method body because 'A' is not abstract" is not fatal.I think they both lead to the same consequences.But colors differs. Why?P.S.I think both colors must be yellow because this is allowed by languge declaration.Even if it is unsafe.This is the same as the following sample.class Foo {}Foo foo = new Foo();foo.callMissing();In yellow "The method 'callMissing' is not defined for the class 'Foo'".The same "foo' must have a method body because 'A' is not abstract" in yellow.And "Members of classes cannot be declared to be 'abstract'" must be in yellow because this static warning not prevent program compilation and execution.Also red color means "error" but "static warning" is not an error but the warning.Is this means that Dart Editor can displays warnings in two colors?As for me, I assume if color is red this is error and not allowed.I this case I always think (because color is red) that this is not allowed by grammar.That is, the wrong color is misleading.Please don't display static warnings in red color in Dart Editor.Or divide the static warnings on two kinds in the grammar.But do not mix colors in Editor for warning. This confused.P.S.I want get answers here but not on Stackoverflow.--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.