Skip to content

Unable to define an empty trait with indentation-based syntax #10080

Closed
@julienrf

Description

@julienrf

Minimized code

trait Foo:
end Foo

Output

This code does not compile. The error message is:

end Foo
^^^
indented definitions expected

However, it is possible to create an empty trait with the brace-significant syntax:

trait Foo {
}

Expectation

The first definition of trait Foo should compile just like the last one.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions