[Chapel Merge] Adjust virtualDispatch to create child fn defaults

Branch: refs/heads/main
Revision: 4b1f2de
Author: mppf
Log Message:

Merge pull request #17989 from mppf/fix-17753

Adjust virtualDispatch to create child fn defaults

Resolves #17753

The reason the test mentioned in that issue was failing is that the
compiler never created the default function for the child's formal. So,
this PR adjusts virtualDispatch to create default functions for
overridden functions where the parent function used a default.

Reviewed by @vasslitvinov - thanks!

  • [x] full local testing

    Modified Files:
    R test/functions/default-arguments/default-argument-class-override1c.bad
    R test/functions/default-arguments/default-argument-class-override1c.future
    M compiler/include/wrappers.h
    M compiler/resolution/virtualDispatch.cpp
    M compiler/resolution/wrappers.cpp

    Compare: Comparing e9d99d101e96...4b1f2de28fb4 · chapel-lang/chapel · GitHub