-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
SpreeSuitable for a future SpreeSuitable for a future Spreearea:inlinearea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancement
Milestone
Description
As discovered in #16804 and raised again in #17181 and #21536, it is clear that better error reporting is required to prevent further ticket opening, by suggesting to remove the inline
from the dependent argument in the compiler error message.
Compiler version
v3.5.0
Minimized code
trait Bar[T]
given [T]: Bar[T] with {}
inline def foo[V](inline value: V)(using Bar[value.type]) : Unit = {} //error
Output
(value : V) is not a valid singleton type, since it is not an immutable path
inline def foo[V](inline value: V)(using Bar[value.type]) : Unit = {}
Expectation
The compiler should provide a hint to remove the inline
keyword from the dependent value to resolve the error.
Gedochao
Metadata
Metadata
Assignees
Labels
SpreeSuitable for a future SpreeSuitable for a future Spreearea:inlinearea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancement