liufengyun / gestalt

gestalt : portable and solid macros for Scala
https://github.com/scalacenter/macros
31 stars 3 forks source link

Fix new instance creation #74

Closed valdisxp1 closed 7 years ago

valdisxp1 commented 7 years ago

A new instance is created by applying the constructor method <init> to the arguments, not by calling New on the type applied to the arguments. I found this out by running the parser on new Some[Int](3), i.e. a modified version of dotty/tools/dotc/parsing/parseFile.scala.

Necessary fix for JSON deserialization #41

liufengyun commented 7 years ago

Thanks a lot @valdisxp1 , I like this change!