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.
Created a new constructor NewInstance
Combined New and AnonymClass into NewAnonymClass as discussed in #73
Refactor: decomposed liftInitCall into multiple always successful, private extractors. This way we do not have to have 2^n cases in a match statement. Reused the same extractors for liftNewInstance
A new instance is created by applying the constructor method
<init>
to the arguments, not by callingNew
on the type applied to the arguments. I found this out by running the parser onnew Some[Int](3)
, i.e. a modified version ofdotty/tools/dotc/parsing/parseFile.scala
.NewInstance
New
andAnonymClass
intoNewAnonymClass
as discussed in #73liftInitCall
into multiple always successful, private extractors. This way we do not have to have 2^n cases in a match statement. Reused the same extractors forliftNewInstance
Necessary fix for JSON deserialization #41