Skip to content

Adding -source:future causes compilation errors due to unsupported wildcard syntax #1841

@arixmkii

Description

@arixmkii

Reopens #496

To address wildcards mentioned in #496 (comment)

This has been promoted to error even in the current LTS.

Example:

//> using scala 3.3.6
//> using option -source:future

import scala.collection.mutable._

@main
def main = println(ListBuffer())

Running it with scala-cli

% scala-cli Underscore.scala
Compiling project (Scala 3.3.6, JVM (25))
[error] ./Underscore.scala:4:33
[error] `_` is no longer supported for a wildcard import; use `*` instead
[error] This construct can be rewritten automatically under -rewrite -source future-migration.
[error] import scala.collection.mutable._
[error]                                 ^
Error compiling project (Scala 3.3.6, JVM (25))
Compilation failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions