- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.1k
 
Closed
Labels
Milestone
Description
Hey, I've probably found a bug inside parser. This code would work without problems in Scala 2. It's a blocker for allowing to compile Scala Native with Scala 3. If it's not a bug, but expected behaviour we would need to change our syntax for Scala 3 users.
Compiler version 3.0.1
Minimized code
class Ptr[T](var value: T):
   def `unary_!` : T = value
   def `unary_!_=`(value: T): Unit = this.value = value
end Ptr
println(!x)
!x = 10                                                                                          Output
1 |!x = 10
  |   ^
  |   end of statement expected but '=' foundExpectation
Should not fail, since it works in Scala 2