Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
An overriding method can't specify a different default value #34437
The failing co19_2 tests appear to be due to missing constant evaluation or error checking after constant evaluation should be performed. I don't think that this should occur in the fasta parser or in AstBuilder, but if so, feel free to assign it to me and I'll fix.
referenced this issue
Sep 12, 2018
I agree that the test should give compile-time errors with the current specification.
Just to clarify, the error reporting wasn't removed in that CL. The code that referenced the error code was removed, but the removed wasn't being run when strong mode was enabled. The removed code indicates that this error was being generated elsewhere, but I have not been able to find where that was suppose to be happening (it wasn't using this error code).
What I can tell you is that these tests were marked as failing when the co19_2 tests were created on Feb 1, 2018 (https://dart-review.googlesource.com/37743). I suspect that this error was accidentally disabled at some point during the development of strong mode. In any case, it's been broken for at least 7 months.
If no compiler implements the restriction, and it'll be a compile-time error to re-introduce it, we may want to consider just dropping the restriction.
It's not required for soundness, and it means that a subclass can't just drop the default value and use