You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
objectIsOn {
// will not exist at runtime, the compiler will only// require that this evidence exists at compile time
erased givenIsOn[On] =newIsOn[On]
}
Minimized code
erased givenInt=1givenerasedLong=2L
Output
[error] --Error:/home/golly/projects/public/univeq/univeq/shared/src/main/scala-3/UnivEq.scala:28:9
[error] 28| erased givenInt=1
[error] |^^^^^
[error] | end of statement expected but 'given' found
[error] -- [E040] SyntaxError:/home/golly/projects/public/univeq/univeq/shared/src/main/scala-3/UnivEq.scala:28:15
[error] 28| erased givenInt=1
[error] |^^^
[error] |';' expected, but identifier found
[error] --Error:/home/golly/projects/public/univeq/univeq/shared/src/main/scala-3/UnivEq.scala:29:15
[error] 29|givenerasedLong=2L
[error] |^^^^
[error] | anonymous givencannot be abstract
[error] -- [E040] SyntaxError:/home/golly/projects/public/univeq/univeq/shared/src/main/scala-3/UnivEq.scala:29:20
[error] 29|givenerasedLong=2L
[error] |^
[error] |';' expected, but '=' found
[error] -- [E006] NotFoundError:/home/golly/projects/public/univeq/univeq/shared/src/main/scala-3/UnivEq.scala:28:2
[error] 28| erased givenInt=1
[error] |^^^^^^
[error] |Notfound: erased
[error] -- [E006] NotFoundError:/home/golly/projects/public/univeq/univeq/shared/src/main/scala-3/UnivEq.scala:29:8
[error] 29|givenerasedLong=2L
[error] |^^^^^^
[error] |Notfound: typeerased
[error] 6 errors found
[error] 6 errors found
Expectation
erased given should compile.
The text was updated successfully, but these errors were encountered:
According to https://github.com/lampepfl/dotty/blob/master/docs/docs/reference/metaprogramming/erased-terms.md,
erased given
should work but it's not (on M3). Snippet from the doc:Minimized code
Output
Expectation
erased given
should compile.The text was updated successfully, but these errors were encountered: