Hi,
I tried the new array literal syntax and the compiler crashed.
What I did was declared the following class
import com.vaadin.annotations.JavaScript
import com.vaadin.ui.AbstractJavaScriptComponent
@JavaScript(*[
"https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js",
"http://caldwell.github.io/renderjson/renderjson.js",
"jsonview.js",
"jsonview-connector.js"]
)
class JsonView : AbstractJavaScriptComponent()
And this generated to following compiler error:
λ gradle testClasses
e: org.jetbrains.kotlin.util.KotlinFrontEndException: Exception while analyzing expression at (7,14) in C:/work/cartrawler/git/shopdirect/src/main/kotlin/com/cartrawler/shopdirect/ui/JsonView.kt:
[
“https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js”,
“http://caldwell.github.io/renderjson/renderjson.js”,
“jsonview.js”,
“jsonview-connector.js”]
at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.logOrThrowException(ExpressionTypingVisitorDispatcher.java:250)
at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.lambda$getTypeInfo$0(ExpressionTypingVisitorDispatcher.java:221)
at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:90)
at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:171)
at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:142)
at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getTypeInfo(ExpressionTypingServices.java:121)
at org.jetbrains.kotlin.resolve.calls.ArgumentTypeResolver.getArgumentTypeInfo(ArgumentTypeResolver.java:225)
at org.jetbrains.kotlin.resolve.calls.CandidateResolver.checkValueArgumentTypes(CandidateResolver.kt:366)
at org.jetbrains.kotlin.resolve.calls.CandidateResolver.checkAllValueArguments(CandidateResolver.kt:344)
at org.jetbrains.kotlin.resolve.calls.CandidateResolver.checkValueArguments(CandidateResolver.kt:110)
at org.jetbrains.kotlin.resolve.calls.CandidateResolver.performResolutionForCandidateCall(CandidateResolver.kt:96)
at org.jetbrains.kotlin.resolve.calls.tower.NewResolutionOldInference.runResolutionForGivenCandidates(NewResolutionOldInference.kt:213)
at org.jetbrains.kotlin.resolve.calls.CallResolver.doResolveCall(CallResolver.java:623)
at org.jetbrains.kotlin.resolve.calls.CallResolver.doResolveCallOrGetCachedResults(CallResolver.java:529)