OriRoth / fling

A fluent API generator
http://drops.dagstuhl.de/opus/volltexte/2019/10805/
24 stars 3 forks source link

Output for Scala #15

Closed yossigil closed 4 years ago

OriRoth commented 4 years ago

@yossigil Scala has Java's type erasure but no raw types, so the Java solution for instantiating the fluent interfaces does not hold. I implemented a brute-force solution, where fluent API classes accept type variable instantiations in the constructor:

class MyClass[T](val t: T) { /*...use t when T value is needed...*/ }

The solution proposed here, to instantiate type variables, did not work properly.