Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我尝试使用多重赋值声明我的变量时,它出现了错误
字段中不允许多次分配
class Ana { def tmp = [] String subject def (ini, sorted, full) = ['','',[:]] Ana(subject) { this.subject = subject } }
但是,当我一一声明它们时,它没有显示错误。
想知道为什么会这样
截屏