When trying to write a regex of the form :
"""[A-Z]_[a-zA-Z]+""".r
The IDE outputs a red underline under the .r keyword.
Could you possibly explain what might be the problem please?
Thanks a lot and good day
When trying to write a regex of the form :
"""[A-Z]_[a-zA-Z]+""".r
The IDE outputs a red underline under the .r keyword.
Could you possibly explain what might be the problem please?
Thanks a lot and good day
Which Scala version and which IDE are you using?
BTW, the .r
is not a keyword, it’s just a normal (extension) method on String. See StringOps
Thanks for your help.
My Scala version is 2.13.4 and I am using the IntelliJ IDE.
Thanks a lot and good day
Did you tried compiling the code with a real compiler, like a build tool (e.g. sbt)?
If no, try it and see, it should just compile; IntelliJ has fame of producing false warnings.
If it doesn’t, then it may help to include the full error as well as the surrounding code here.
Thanks for your help.
Is there any particular IDE which you would prefer please ?
Thanks a lot and good day
I personally like to use metals with vscode.
The good things are: it is fast and produces correct diagnostics since it is using a real compiler under the hood, also since I use it together with sbt as the bsp
then the compilation is shared which is great.
The bad things are:
Most people I know use IntelliJ IDEA. The false errors can be annoying, but usually they are no big deal.
PĂĄ torsdag 28. januar 2021 kl. 14:43:23, skrev Gianluca via Scala Users <[email protected]>:
| gzah
January 28 |
- | - |
Thanks for your help.
Is there any particular IDE which you would prefer please ?
Thanks a lot and good day
Note that IntelliJ also uses a “real compiler” when compiling. It’s when IntelliJ IDEA is performing code-inspection (highlighting etc) that it sometimes misses, but IMO the benefits of IntelliJ far outwieghts this.