Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most expression now show lint error "Incorrect number of expressions" #2373

Open
SamYStudiO opened this issue May 13, 2024 · 5 comments
Open
Labels
bug 🪲 Something isn't working

Comments

@SamYStudiO
Copy link

SamYStudiO commented May 13, 2024

Since mapbox Android 11.4.0

For example

circleColor(
    switchCase {
        eq {
            get { literal("type") }
            literal(RouteShapeWaypointType.AUTO.name)
        }
        color(Color.RED)

        color(Color.YELLOW)
    },
)

Here both switchCase and eq expression are concerned !!!

image

Incorrect number of expressions within switchCase Expression: expected an odd number, but 2 was found. More... (Ctrl+F1)

Incorrect number of expressions within eq Expression: expected 2 or 3, but 1 was found. More... (Ctrl+F1)
@SamYStudiO SamYStudiO added the bug 🪲 Something isn't working label May 13, 2024
@kiryldz
Copy link
Contributor

kiryldz commented May 13, 2024

@SamYStudiO hey!

Since mapbox Android 11.4.0

What version did you use before moving to 11.4.0?

@SamYStudiO
Copy link
Author

SamYStudiO commented May 13, 2024

@SamYStudiO hey!

Since mapbox Android 11.4.0

What version did you use before moving to 11.4.0?

@kiryldz 11.3

@kiryldz
Copy link
Contributor

kiryldz commented May 14, 2024

@SamYStudiO I do not see similar issues and we did not modify those lint rules between v11.3 and v11.4. I assume that despite lint complaining - the code does compile OK, right?

@SamYStudiO
Copy link
Author

SamYStudiO commented May 14, 2024

@kiryldz It does compile !
I was coming from 11.3 but since i haven't tried to compile with 11.3 i may have missed the issue and so it may be anterior to 11.3

@ittna
Copy link

ittna commented May 16, 2024

Maybe related to gradle update. At least I started getting these after updating to AGP 8.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants