summaryrefslogtreecommitdiff
path: root/test/files/run/sammy_restrictions_LMF.scala
Commit message (Collapse)AuthorAgeFilesLines
* LMF cannot instantiate SAM of trait with non-trait superclassAdriaan Moors2016-03-291-0/+9
| | | | | | | | | | | | Also, drop AbstractFunction for parent of anonymous subclass of function type that must have its class spun up at compile time (rather than at linkage time by LambdaMetaFactory). This revealed an old problem with typedTemplate, in which parent types may be normalized at the level of trees, while this change does not get propagated to the class's info in time for the constructor to be located when we type check the primary constructor.
* LMF cannot run trait's "initializer" (constructor)Adriaan Moors2016-03-291-1/+7
| | | | | | Thus, rule out traits that have a constructor (which we use as a proxy for having potentially side-effecting statements), and create an anonymous subclass for them at compile time.
* Better detection of types LMF cannot instantiate.Adriaan Moors2016-03-291-0/+42
LambdaMetaFactory can only properly instantiate Java interfaces (with one abstract method, of course). A trait always compiles to an interface, but a subclass that can be instantiated may require mixing in further members, which LMF cannot do. (Nested traits, traits with fields,... do not qualify.) Traits that cannot be instantiated by LMF are still SAM targets, we simply created anonymous subclasses as before.