Skip to content

Instantly share code, notes, and snippets.

View zawodskoj's full-sized avatar
🚗
купил гранту

Дмитрий Заводской zawodskoj

🚗
купил гранту
View GitHub Profile
@zawodskoj
zawodskoj / Iso.scala
Last active November 27, 2020 15:04
simple spread operator impl working on dotty 3.0.0-M2
object Iso {
import scala.deriving._
import scala.quoted._
import shapeless._
inline def construct[A]: A = ${ constructImpl[A] }
def constructImpl[A: Type](using q: Quotes) = {
import q.reflect._
val ctor = TypeRepr.of[A].classSymbol.get.primaryConstructor
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using LinqToDB;
using LinqToDB.Data;