Skip to content

Commit

Permalink
visitLambda only when in function or method
Browse files Browse the repository at this point in the history
  • Loading branch information
anquetil committed Jan 8, 2024
1 parent 67281ce commit 4a7e49a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/MoosePy/MSEPythonToFamixImporterVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,12 @@ MSEPythonToFamixImporterVisitor >> visitLambda: aLambdaNode [

| fmx result |

"for now only create lambda if we are inside a function/method
This is needed because there is a bug in SmaCC"

({FamixPythonFunction . FamixPythonMethod} includes: context top class)
ifFalse: [ ^nil ].

fmx := self createLambda: aLambdaNode.

context push: fmx.
Expand Down

0 comments on commit 4a7e49a

Please sign in to comment.