-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4105f2
commit 0cc6b48
Showing
33 changed files
with
96 additions
and
96 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
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
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
-- [E042] Type Error: tests/neg-macros/annot-TastyAnnotation-direct.scala:3:0 ------------------------------------------ | ||
3 |@TastyAnnotation // error | ||
|^^^^^^^^^^^^^^^^ | ||
|TastyAnnotation is a trait; it cannot be instantiated | ||
| | ||
| longer explanation available when compiling with `-explain` |
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,4 @@ | ||
import scala.annotation.TastyAnnotation | ||
|
||
@TastyAnnotation // error | ||
def test = () |
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
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import scala.annotation.{experimental, MacroAnnotation} | ||
import scala.annotation.{experimental, TastyAnnotation} | ||
import scala.quoted._ | ||
|
||
@experimental | ||
class nilAnnot extends MacroAnnotation { | ||
class nilAnnot extends TastyAnnotation { | ||
def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = | ||
Nil | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
import scala.annotation.{experimental, MacroAnnotation} | ||
import scala.annotation.{experimental, TastyAnnotation} | ||
import scala.quoted._ | ||
|
||
class Foo: | ||
@experimental | ||
class void extends MacroAnnotation: // error | ||
class void extends TastyAnnotation: // error | ||
def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = List(tree) | ||
|
||
object Bar: | ||
@experimental | ||
class void extends MacroAnnotation: // error | ||
class void extends TastyAnnotation: // error | ||
def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = List(tree) | ||
|
||
class Foo2: | ||
@experimental | ||
trait void extends MacroAnnotation // error | ||
trait void extends TastyAnnotation // error | ||
|
||
object Bar: | ||
@experimental | ||
trait void extends MacroAnnotation // error | ||
trait void extends TastyAnnotation // error | ||
|
||
def test: Unit = | ||
@experimental | ||
class void extends MacroAnnotation: // error | ||
class void extends TastyAnnotation: // error | ||
def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = List(tree) | ||
|
||
trait void2 extends MacroAnnotation // error | ||
trait void2 extends TastyAnnotation // error | ||
|
||
new MacroAnnotation {} // error | ||
new TastyAnnotation {} // error | ||
|
||
() | ||
|
||
val test2: Unit = | ||
@experimental | ||
class void extends MacroAnnotation: // error | ||
class void extends TastyAnnotation: // error | ||
def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = List(tree) | ||
|
||
trait void2 extends MacroAnnotation // error | ||
trait void2 extends TastyAnnotation // error | ||
|
||
new MacroAnnotation {} // error | ||
new TastyAnnotation {} // error | ||
|
||
() |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import scala.annotation.{experimental, MacroAnnotation} | ||
import scala.annotation.{experimental, TastyAnnotation} | ||
import scala.quoted._ | ||
|
||
@experimental | ||
class voidAnnot extends MacroAnnotation { | ||
class voidAnnot extends TastyAnnotation { | ||
def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = | ||
List(tree) | ||
} |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import scala.annotation.{experimental, MacroAnnotation} | ||
import scala.annotation.{experimental, TastyAnnotation} | ||
import scala.quoted._ | ||
|
||
@experimental | ||
class voidAnnot extends MacroAnnotation { | ||
class voidAnnot extends TastyAnnotation { | ||
def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = | ||
List(tree) | ||
} |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import scala.annotation.{experimental, MacroAnnotation} | ||
import scala.annotation.{experimental, TastyAnnotation} | ||
import scala.quoted._ | ||
|
||
@experimental | ||
class voidAnnot extends MacroAnnotation { | ||
class voidAnnot extends TastyAnnotation { | ||
def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = | ||
List(tree) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import scala.annotation.{experimental, MacroAnnotation} | ||
import scala.annotation.{experimental, TastyAnnotation} | ||
import scala.quoted._ | ||
|
||
object Foo: | ||
@experimental | ||
class void extends MacroAnnotation: | ||
class void extends TastyAnnotation: | ||
def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = List(tree) | ||
|
||
object Bar: | ||
@experimental | ||
class void extends MacroAnnotation: | ||
class void extends TastyAnnotation: | ||
def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = List(tree) |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import scala.annotation.{experimental, MacroAnnotation} | ||
import scala.annotation.{experimental, TastyAnnotation} | ||
import scala.quoted._ | ||
|
||
@experimental | ||
class void extends MacroAnnotation: | ||
class void extends TastyAnnotation: | ||
def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = | ||
List(tree) |
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
Oops, something went wrong.