Skip to content

Commit

Permalink
Filtering check should not assume anything
Browse files Browse the repository at this point in the history
  • Loading branch information
arminzavada committed Nov 13, 2024
1 parent c2945be commit 128e83b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class OperationInliner(

private fun Operation.rewriteToArguments(arguments: List<Argument>, bindings: List<ArgumentBinding>): Operation {
val references = EcoreUtil2.getAllContents<EObject>(this, true).asSequence().filterIsInstance<ChainReferenceExpression>().filter {
arguments.contains(it.chains.first().referencedElement())
arguments.contains(it.chains.firstOrNull()?.referencedElementOrNull())
}.toList()

for (reference in references) {
Expand Down

0 comments on commit 128e83b

Please sign in to comment.