-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from tpolecat/3.0.0-M2
add support for 3.0.0-M2
- Loading branch information
Showing
4 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) 2020 by Rob Norris | ||
// This software is licensed under the MIT License (MIT). | ||
// For more information see LICENSE or https://opensource.org/licenses/MIT | ||
|
||
package org.tpolecat.typename | ||
|
||
import scala.quoted._ | ||
|
||
trait TypeNamePlatform { | ||
|
||
inline given [A] as TypeName[A] = | ||
${TypeNamePlatform.impl[A]} | ||
|
||
} | ||
|
||
object TypeNamePlatform { | ||
|
||
def impl[A](using t: Type[A], ctx: Quotes): Expr[TypeName[A]] = | ||
'{TypeName[A](${Expr(Type.show[A])})} | ||
|
||
} |