Picture says it all:
I want the squiggle to be under Int
, rather than having it under an unintended type (Unit
in the example)
How do I achieve this behavior?
Picture says it all:
I want the squiggle to be under Int
, rather than having it under an unintended type (Unit
in the example)
How do I achieve this behavior?
You can't. All kinds of errors, warnings, problems, etc. for certain behavior are pre-setup and called inspections in IntelliJ. They are configured in "Inspections"(Preferences | Editor | Inspections) for all languages and frameworks separately. The only configuration available there is to enable/disable an inspection and change its severity level - you cannot change how they work.
UPDATE:
Apparently, recently Jetbrains introduced the feature to create custom inspections through Structural Search Inspection. You should be able to create custom inspection for Scala otherwise it's still not achievable.
And there is still no posibility to edit pre-existing inspections though as of version 2020.1
You have defined a function that returns Int but your implementation returns Unity, you can fix it by providing a default return value or null