This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import scala.NamedTuple.{AnyNamedTuple, NamedTuple} | |
| import scala.quoted.* | |
| transparent inline def defaults[T](inline fun: T): DefaultsExtractor = ${ defaultsImpl('{ fun }) } | |
| def defaultsImpl[T: Type](expr: Expr[T])(using quotes: Quotes): Expr[DefaultsExtractor] = | |
| import quotes.reflect.* | |
| val Lambda(_, Apply(term, _)) = expr.asTerm.underlying.runtimeChecked | |
| val methodSymbol = term.symbol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.avsystem.commons | |
| package analyzer | |
| import org.scalatest.funsuite.AnyFunSuite | |
| final class ImplicitFunctionParamsTest extends AnyFunSuite with AnalyzerTest { | |
| test("regular parameter with function type should pass") { | |
| assertNoErrors(scala"def goodMethod1(f: Int => String): Unit = ???") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE video_games | |
| ( | |
| id INTEGER not null, | |
| name VARCHAR(255) not null, | |
| game_genre TEXT not null, | |
| game_developer VARCHAR(255) not null, | |
| release_date DATE not null, | |
| PRIMARY KEY (id) | |
| ); |