Forwarding stubs do not handle default parameter values correctly #31027
Labels
area-front-end
Use area-front-end for front end / CFE / kernel format related issues.
customer-dart-2
front-end-kernel
P1
A high priority bug; for example, a single project is unusable or has many test failures
Projects
Milestone
Consider the following code (which I'll be submitting as a test case shortly):
This test fails with the current front end, because when the front end generates forwarding stubs for the class
C
, it doesn't preserve the default values fromB::f
andB::g
. The front end is adding these methods to the kernel representation of classC
:(Note the absence of default values for the
x
parameters). We could fix the bug by copying over the default values from classB
, but that would lead to problems with modular compilation, since we don't want to have to preserve default parameter values in summaries. It would be much nicer if we could fix this bug my having a special representation of forwarding stubs in kernel, and let the back end take care of doing the right thing with default parameter values.@kmillikin I understand you're thinking of making a similar change to how redirecting constructors are represented, for similar reasons. What do you think?
The text was updated successfully, but these errors were encountered: