'Intellij's "Language level" settings
In Intellij IDE, in a Scala project, when I go to "Project Settings", I see two settings of "Language level".
One is under "Project", and the other is under "Modules".
What do these "Language level" settings do, and what is the difference between them?
What would happen if I lowered each one of these "Language level" settings to a different level?
In both settings, I was able to select a "Language level" which was lower than the selected (installed) SDK version. For example, SDK version is 18, but under "Project" I changed the "Language level" to 8.
Does it mean that any of these "Language level" settings can make Intellij compile/run a project as if with an SDK of a version which is lower than the actual version of the selected (installed) SDK?
Solution 1:[1]
The language level for the module has a higher priority than the project's language level. In fact, project's language level is just a default value for module's language level.
In case of difference between configured SDK and language level, you will get all the in-editor inspections for the version of Java set in Language level, but the project will be compiled using the SDK defined in "SDK".
See JetBrains' video for more information: https://www.youtube.com/watch?v=W4EK_KVgfkw
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Konstantin Annikov |
