diff --git a/hugo/content/docs/recipes/validation/dependency-loops.md b/hugo/content/docs/recipes/validation/dependency-loops.md index 274709f0..5cb2f3d0 100644 --- a/hugo/content/docs/recipes/validation/dependency-loops.md +++ b/hugo/content/docs/recipes/validation/dependency-loops.md @@ -26,7 +26,10 @@ Examples for such dependency loops are: bar(); } void bar() { - foo(); //error, foo calls bar, bar calls foo + answer42(); + } + void answer42() { + bar(); //error, foo calls bar, bar calls answer42, answer42 calls foo } ``` @@ -214,6 +217,10 @@ Brain greets Homer! //error Pinky greets Marge! ``` +Here is the screenshot of VS Code with the error: + +![Greeting loop errors](/assets/dependency-loops.png) + ### Dependency resolution The topological sort can be done like this: diff --git a/hugo/static/assets/dependency-loops.png b/hugo/static/assets/dependency-loops.png new file mode 100644 index 00000000..f658d0dd Binary files /dev/null and b/hugo/static/assets/dependency-loops.png differ