Skip to content

using_directives parser crashes on */*/Foo.scala #3374

Closed
@prolativ

Description

@prolativ

Version(s)
1.5.4

Describe the bug
Using a nested wildcard (*/*/...) in exclude directive results in a crash caused by java.lang.ArrayIndexOutOfBoundsException

To Reproduce
Having the following project structure:

  • ./project.scala:
//> using exclude */*/Foo.scala
  • ./dir1/dir2/Foo.scala:
val foo // invalid code

Try to compile the project:

scala-cli compile .

Expected behaviour
Should not crash. Also the invalid file Foo.scala should be excluded from compilation sources and the compilation should succeed

Metadata

Metadata

Assignees

Labels

--excludeIssues tied with the excluding inputs.bugSomething isn't workingusing directivesIssues tied with using directives.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions