/* * Copyright 2020 Google LLC * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // WITH_RUNTIME // TEST PROCESSOR: JavaWildcard2Processor // EXPECTED: // MyEnum : Any // : MyEnum // VarianceSubjectSuppressed : Any // R : Any? // starList : List // typeArgList : List // numberList : List // stringList : List // enumList : List // jvmWildcard : List // suppressJvmWildcard : List<[@kotlin.jvm.JvmSuppressWildcards] Number> // : VarianceSubjectSuppressed // propWithFinalType : String // propWithFinalType.getter() : String // : String // propWithOpenType : Number // propWithOpenType.getter() : Number // : Number // propWithFinalGeneric : List // propWithFinalGeneric.getter() : List // : List // propWithOpenGeneric : List // propWithOpenGeneric.getter() : List // : List // propWithTypeArg : R // propWithTypeArg.getter() : R // : R // propWithTypeArgGeneric : List // propWithTypeArgGeneric.getter() : List // : List // propWithOpenTypeButSuppressAnnotation : Number // propWithOpenTypeButSuppressAnnotation.getter() : Number // : Number // list2 : List // list1 : List // list3 : List // listTypeArg : List // list4 : List // listTypeArgNumber : List // list5 : List // listTypeArgString : List // list6 : List // listTypeArgEnum : List // list7 : List // explicitJvmWildcard : List // list8 : List<[@kotlin.jvm.JvmSuppressWildcards] Number> // explicitJvmSuppressWildcard_OnType : List<[@kotlin.jvm.JvmSuppressWildcards] Number> // list9 : [@kotlin.jvm.JvmSuppressWildcards] List // explicitJvmSuppressWildcard_OnType2 : [@kotlin.jvm.JvmSuppressWildcards] List // END enum class MyEnum() @JvmSuppressWildcards class VarianceSubjectSuppressed( starList: List<*>, typeArgList: List, numberList: List, stringList: List, enumList: List, jvmWildcard: List<@JvmWildcard String>, suppressJvmWildcard: List<@JvmSuppressWildcards Number> ) { var propWithFinalType: String = "" var propWithOpenType: Number = 3 var propWithFinalGeneric: List = TODO() var propWithOpenGeneric: List = TODO() var propWithTypeArg: R = TODO() var propWithTypeArgGeneric: List = TODO() @JvmSuppressWildcards var propWithOpenTypeButSuppressAnnotation: Number = 3 fun list1(list2: List<*>): List<*> { TODO() } fun listTypeArg(list3: List): List { TODO() } fun listTypeArgNumber(list4: List): List { TODO() } fun listTypeArgString(list5: List): List { TODO() } fun listTypeArgEnum(list6: List): List { TODO() } fun explicitJvmWildcard( list7: List<@JvmWildcard String> ): List<@JvmWildcard String> { TODO() } fun explicitJvmSuppressWildcard_OnType( list8: List<@JvmSuppressWildcards Number> ): List<@JvmSuppressWildcards Number> { TODO() } fun explicitJvmSuppressWildcard_OnType2( list9: @JvmSuppressWildcards List ): @JvmSuppressWildcards List { TODO() } }