File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
src/compiler/scala/tools/reflect/quasiquotes
test/files/scalacheck/quasiquotes Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ trait Parsers { self: Quasiquotes =>
22
22
def parse (code : String ): Tree = {
23
23
try {
24
24
val file = new BatchSourceFile (nme.QUASIQUOTE_FILE , code)
25
- new QuasiquoteParser (file).parseRule(entryPoint)
25
+ val parser = new QuasiquoteParser (file)
26
+ parser.checkNoEscapingPlaceholders { parser.parseRule(entryPoint) }
26
27
} catch {
27
28
case mi : MalformedInput => c.abort(correspondingPosition(mi.offset), mi.msg)
28
29
}
Original file line number Diff line number Diff line change @@ -160,6 +160,18 @@ object ErrorProps extends QuasiquoteProperties("errors") {
160
160
q"$n"
161
161
""" )
162
162
163
+ property(" SI-8211: check unbound placeholder paremeters" ) = fails(
164
+ " unbound placeholder parameter" ,
165
+ """
166
+ q"_"
167
+ """ )
168
+
169
+ property(" SI-8211: check unbound wildcard types" ) = fails(
170
+ " unbound wildcard type" ,
171
+ """
172
+ tq"_"
173
+ """ )
174
+
163
175
// // Make sure a nice error is reported in this case
164
176
// { import Flag._; val mods = NoMods; q"lazy $mods val x: Int" }
165
177
}
You can’t perform that action at this time.
0 commit comments