Skip to content

"missing argument" for default annotation parameter to Java interface #2760

Closed
@olafurpg

Description

@olafurpg
$ cat <<EOT >> bench.scala
package foo

@Fork(value = 16)
class Bar
EOT
$ cat <<EOT >> fork.java
package foo;

public @interface Fork {
    int value() default -1;
    int warmups() default -1;
}
EOT
$ scalac bench.scala fork.java # using 2.12.2
$ dotc bench.scala fork.java
-- Error: bench.scala:3:0 ------------------------------------------------------
3 |@Fork(value = 16)
  |^^^^^^^^^^^^^^^^
  |missing argument for parameter warmups of constructor Fork: (value: Int, warmups: Int)foo.Fork

one error found

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions