Skip to content

Commit dff2e5d

Browse files
committed
dfmc-conversion: Fix next-method generation crash
* sources/dfmc/conversion/convert.dylan (convert-next-method-into): Since in some cases a <&lambda> may not have a model-definition at the point where next-method code generation occurs, use lambda-source-location as the contextual source location when generating the next-method closure fragment.
1 parent ae23962 commit dff2e5d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sources/dfmc/conversion/convert.dylan

+3-1
Original file line numberDiff line numberDiff line change
@@ -1648,8 +1648,10 @@ define method convert-next-method-into
16481648
next-ref :: <value-reference>)
16491649
=> ()
16501650
f.^function-next? := #t;
1651+
let loc = lambda-source-location(f);
16511652
let fragment
1652-
= with-expansion-source-form (model-definition(f))
1653+
= with-expansion-source-location (loc & source-location-record(loc),
1654+
loc & source-location-source-position(loc))
16531655
generate-next-method-function-fragment(f, signature-spec, next-ref)
16541656
end;
16551657
let (f-start, f-end, f-temp) = convert-1(env, fragment);

0 commit comments

Comments
 (0)