mirror of
https://github.com/adelphes/android-dev-ext.git
synced 2025-12-23 09:59:25 +00:00
casting only applies to qualified term not a whole expression
This commit is contained in:
@@ -1512,7 +1512,7 @@ function rootTerm(tokens, locals, method, imports, typemap) {
|
|||||||
if (!type) {
|
if (!type) {
|
||||||
addproblem(tokens, ParseProblem.Error(close_bracket, 'Type expected'));
|
addproblem(tokens, ParseProblem.Error(close_bracket, 'Type expected'));
|
||||||
}
|
}
|
||||||
const cast_matches = expression(tokens, locals, method, imports, typemap)
|
const cast_matches = qualifiedTerm(tokens, locals, method, imports, typemap)
|
||||||
// cast any variables as values with the new type
|
// cast any variables as values with the new type
|
||||||
const vars = cast_matches.variables.map(v => {
|
const vars = cast_matches.variables.map(v => {
|
||||||
if (type && !isTypeCastable(v.type, type)) {
|
if (type && !isTypeCastable(v.type, type)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user