# Scala Compiler Implicit Parameter Precedence


The compiler doesn’t randomly look for implicits in your code; it follows the following precedence:

1. Locally declared implicits
1. Imported implicits
1. Outer scope (ex- a class for a method)
1. Inheritance
1. Package object
1. Implicit scope like companion objects



---
Source: [Top 30 Scala Interview Questions](https://data-flair.training/blogs/scala-interview-questions/)
