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

Resolving type arguments may throw an exception for star projections #412

Open
vRallev opened this issue Jul 2, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@vRallev
Copy link
Contributor

vRallev commented Jul 2, 2024

Following code exists as is today in KSAstType:

    override val arguments: List<AstType>
        get() = type.arguments.map {
            val argumentType = checkNotNull(it.type) {
                "Couldn't resolve type for $it with variance ${it.variance} from parent type $type"
            }
            KSAstType(resolver, argumentType)
        }

This may crash, if the type is null and this happens in some cases for star projections as highlighted in #411. This exception is caught only when checking for wrongly placed qualifiers for now.

@evant evant added the bug Something isn't working label Jul 2, 2024
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

2 participants