File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/test/scala/com/github/dwickern/macros Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,16 @@ class NameOfTest extends AnyFunSuite with Matchers {
153153 illTyped(""" nameOf(this) """ , " Unsupported expression: this" )
154154 }
155155
156+ test(" error: throw" ) {
157+ illTyped(""" nameOf(throw new Exception("test")) """ ,
158+ """ Unsupported expression: throw new scala\.`package`\.Exception\("test"\)""" )
159+ }
160+
161+ test(" error: nested" ) {
162+ def foo = ???
163+ illTyped(""" nameOf(nameOf(foo)) """ , " Unsupported constant expression: \" foo\" " )
164+ }
165+
156166 test(" error: literals" ) {
157167 illTyped(""" nameOf("test") """ , " Unsupported constant expression: \" test\" " )
158168 illTyped(""" nameOf(123) """ , " Unsupported constant expression: 123" )
You can’t perform that action at this time.
0 commit comments