Skip to content

@targetName can be used on trait/class/object #11969

Closed
@griggt

Description

@griggt

Compiler version

3.0.0-RC2

Minimized code

import annotation.targetName

@targetName("Foo") class Bar
@targetName("Huh") object Bar
@targetName("Wow") trait OhMy

Output

$ ls -l *.class
-rw-r--r-- 1 tgrigg tgrigg 280 Apr  1 11:15  Foo.class
-rw-r--r-- 1 tgrigg tgrigg 554 Apr  1 11:15 'Huh$.class'
-rw-r--r-- 1 tgrigg tgrigg 133 Apr  1 11:15  Wow.class

Expectation

I expected this usage of @targetName to be disallowed.

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