Skip to content

dotc -target option problem #8633

Closed
Closed
@ohze

Description

@ohze

Some problems related to dotc target option:

  • compile error targets: msil, jvm-1.5-fjbg, jvm-1.5-asm:
% echo '@main def hi() = println("hi!")' > hi.scala
% dotc -target:jvm-1.5-asm hi.scala
exception occurred while compiling hi.scala
scala.MatchError: jvm-1.5-asm (of class java.lang.String) while compiling hi.scala
Exception in thread "main" scala.MatchError: jvm-1.5-asm (of class java.lang.String)
	at dotty.tools.backend.jvm.BCodeIdiomatic.classfileVersion(BCodeIdiomatic.scala:30)

The error is caused by this: BCodeIdiomatic.scala

  • (maybe?) runtime error targets: jvm-1.5, jvm-1.6, jvm-1.7
    dotc -target:jvm-1.5-asm hi.scala success but I think we cannot run the output classes with jvm 1.5?

  • don't have targets 9 to 15 which scala 2.13 has.

  • similar, scalac has option -release 9. IDK supporting this option in dotc is hard or not?
    EDIT: I have created a separated issue support -release option #8634 for -release option

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions