scala / docs.scala-lang

The Scala Documentation website
http://docs.scala-lang.org
559 stars 1.02k forks source link

Fix syntax error on Scala 3.3.1 #2958

Closed Dieken closed 7 months ago

Philippus commented 7 months ago

Maybe also changed it here in one go: https://github.com/scala/docs.scala-lang/blob/68e3b5ce9fe30c43a7249f4d3675ffd441cefab2/_zh-cn/overviews/scala3-book/scala-for-java-devs.md?plain=1#L502

Dieken commented 7 months ago

Pushed again, thanks for your reminder!

Philippus commented 7 months ago

I get:

Welcome to Scala 3.3.1 (17.0.10, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
>....                                                                                                                                                                       | 
     | trait Green:
     |   println("I’m green")
     | 
     | // mix in the traits as DavidBanner
     | // is created
     | val hulk = new DavidBanner with Big, Angry, Green
-- Error: ----------------------------------------------------------------------
15 |val hulk = new DavidBanner with Big, Angry, Green
   |                                   ^
   |                                 end of statement expected but ',' found
bishabosha commented 7 months ago

oh right, sorry about that I didn't notice it was an anonymous class instance!