Coder Social home page Coder Social logo

使用withStringArrayList在接收参数地方会出现One type argument expected for typealias ArrayList<E> = ArrayList<E> about arouterkspcompiler HOT 7 CLOSED

jailedbird avatar jailedbird commented on June 7, 2024
使用withStringArrayList在接收参数地方会出现One type argument expected for typealias ArrayList = ArrayList

from arouterkspcompiler.

Comments (7)

JailedBird avatar JailedBird commented on June 7, 2024

如图 UK7TY %B_X121)V@{X2JK~1

可以提供下 @Autowired的字段么? 我这边看下什么原因

from arouterkspcompiler.

fuxuanyang11 avatar fuxuanyang11 commented on June 7, 2024

image

from arouterkspcompiler.

JailedBird avatar JailedBird commented on June 7, 2024

如图 UK7TY %B_X121)V@{X2JK~1

请更新最新的测试版本1.6.10-1.0.1-beta01, 然后重新生成代码;
Bug原因: ArrayList在Kotlin属于typealias Class, 相似的类如下, 理论上都会出现问题(可以自行尝试下):

@SinceKotlin("1.1") public actual typealias ArrayList<E> = java.util.ArrayList<E>
@SinceKotlin("1.1") public actual typealias LinkedHashMap<K, V> = java.util.LinkedHashMap<K, V>
@SinceKotlin("1.1") public actual typealias HashMap<K, V> = java.util.HashMap<K, V>
@SinceKotlin("1.1") public actual typealias LinkedHashSet<E> = java.util.LinkedHashSet<E>
@SinceKotlin("1.1") public actual typealias HashSet<E> = java.util.HashSet<E>

本质上是我的代码没处理好TypeAlias Handling 这一块:
image

参照kotlinPoet官方文档 TypeAlias Handling 解决了这个问题, 项目App模块也添加了对应的测试例子, 如果修复麻烦告知, 我更新正式版本😊

from arouterkspcompiler.

fuxuanyang11 avatar fuxuanyang11 commented on June 7, 2024

使用1.6.10-1.0.1-beta01版本没有问题了。有个问题:我ksp使用的版本是1.8.0-1.0.9,这个用1.6.10会有影响吗

from arouterkspcompiler.

JailedBird avatar JailedBird commented on June 7, 2024

可能会(KSP本身存在bug), 我明天给你打包一个1.8.0版本的分支, 我先暂时关闭这个Issue了哈

from arouterkspcompiler.

fuxuanyang11 avatar fuxuanyang11 commented on June 7, 2024

可能会(KSP本身存在bug), 我明天给你打包一个1.8.0版本的分支, 我先暂时关闭这个Issue了哈

👌,谢谢大佬

from arouterkspcompiler.

JailedBird avatar JailedBird commented on June 7, 2024

可能会(KSP本身存在bug), 我明天给你打包一个1.8.0版本的分支, 我先暂时关闭这个Issue了哈

👌,谢谢大佬

对应版本已发布, 请前往main分支README查看

from arouterkspcompiler.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.