question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type named `$` is replaced by empty string in error messages

See original GitHub issue

Compiler version

3.1.3-RC2

Minimized code

case class $[A](value: A)

def f(x: Int): Unit = {}

f(T(3))

Output

Found:   [Int]
Required: Int

Notice the missing $.

Expectation

Found:    $[Int]
Required: Int

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
nicolasstuckicommented, Jul 5, 2022

The best thing we could do is to identify names containing $ and emit a warning. Most users do not know that these names are reserved for compiler generated code.

1reaction
som-snyttcommented, Jul 7, 2022

The issue about accessing Scala MODULE$ from Java makes me think messages should never strip dollar in a Java context.

7 |import bar.slf4j.ScalaMDCAdapter$;
  |                 ^
  |                 value ScalaMDCAdapter is not a member of bar.slf4j - did you mean slf4j.ScalaMDCAdapter?

https://github.com/lampepfl/dotty/issues/15608

Read more comments on GitHub >

github_iconTop Results From Across the Web

Empty string treated as missing message · Issue #607 - GitHub
Yes, if a message is an empty string it's considered an error. This means there is no way for a message to be...
Read more >
Error: Message content must be a non-empty string.
The memberCount property returns a number which you are trying to send in a channel. The problem is that sending a number is...
Read more >
Empty String Considered Harmful - Sam Jarman
The use of empty strings when used to indicate a null value or lack of value, when the language you're using has a...
Read more >
WFFM error :Empty strings are not allowed.Parameter name
Hi @Gatogordo , I went to the location "/sitecore/system/Modules/Web Forms for Marketers/Settings/Meta data/Mvc Validation Error Messages" and ...
Read more >
Python Strings
The formal name of the string type is "str". The str() function serves to ... Replacing with the empty string effectively deletes the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found