Fix type annot on method ref in cast ctx
This commit is contained in:
@ -2499,7 +2499,7 @@ private void UnaryExprNotPmStart() #void:
|
||||
// Condensed FIRST set of UnaryExpressionNotPlusMinus
|
||||
// Avoid looking ahead for a whole UnaryExpressionNotPlusMinus, but just for a token
|
||||
|
||||
"~" | "!" | "(" | "switch" | "new" | "this" | "super" | Literal()
|
||||
"~" | "!" | "(" | "switch" | "new" | "this" | "super" | Literal() | "@"
|
||||
| <IDENTIFIER>
|
||||
| "void" | PrimitiveType()
|
||||
}
|
||||
|
@ -209,6 +209,21 @@ class ASTMethodReferenceTest : ParserTestSpec({
|
||||
it::getTypeArguments shouldBe null
|
||||
}
|
||||
}
|
||||
|
||||
// annotated method ref in cast ctx (lookahead trickery)
|
||||
"(Foo) @Vernal Date::getDay" should parseAs {
|
||||
castExpr {
|
||||
classType("Foo")
|
||||
|
||||
methodRef(methodName = "getDay") {
|
||||
classType("Date") {
|
||||
annotation("Vernal")
|
||||
}
|
||||
|
||||
it::getTypeArguments shouldBe null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user