Highlighting of arguments to by-name parameters

In Scala it’s not always obvious when some expression is an argument to a by-name parameter. New highlighting helps to easily spot such expression.

Here’s how it works:

You may also gray-out literals if you wish (disabled by default):

Block expressions are supposed to be called by-name, so, by default, there’s no such highlighting for them:

However, you may turn it on:

The highlighting also works with implicit conversions that use by-name parameter:

Here’s the definition of implicit conversion:

About Pavel Fatin

IntelliJ Scala plugin developer (http://pavelfatin.com)
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Highlighting of arguments to by-name parameters

  1. Hi,

    Can you say in which programming language you have used in this example? I didn’t get the whole picture, perhaps you would present a more clear case.

    Cheers

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">