This is MetaPost, version 2.11 (TeX Live 2025) (kpathsea version 6.4.1)
(/usr/local/texlive/2025/texmf-dist/metapost/base/mpost.mp
(/usr/local/texlive/2025/texmf-dist/metapost/base/plain.mp
Preloading the plain mem file, version 1.005) ) (./nested-input.mp [1]
(./sub.mp
>> x9
! Undefined x coordinate has been replaced by 0.
<to be read again> 
                   {
--->{
     curl1}..{curl1}
foo->draw.z9--
              z8
l.3 foo
       ;
>> y9
! Undefined y coordinate has been replaced by 0.
<to be read again> 
                   {
--->{
     curl1}..{curl1}
foo->draw.z9--
              z8
l.3 foo
       ;
>> x8
! Undefined x coordinate has been replaced by 0.
<to be read again> 
                   ;
l.3 foo;
        
>> y8
! Undefined y coordinate has been replaced by 0.
<to be read again> 
                   ;
l.3 foo;
        
[7])
! An expression can't begin with `right delimiter'.
<inserted text> 
                0
<to be read again> 
                   )
l.6 draw (0,0)--(1,1)--(2,)
                           ;
[2] )
(see the transcript file for additional information)
3 output files written: nested-input.1 .. nested-input.7
Transcript written on nested-input.log.
