top of page

[Scala] Runtime error occurs though syntax should be correct


Phenomenon

When I build and run a project written with scala + chisel, the following error occurred.


java.lang.IllegalArgumentException: requirement failed: BitPats must be in binary and be prefixed with 'b’



The message says that BitPat's syntax is wrong (start with b), but no matter how many times I look at it, the syntax is correct



Cause and solution

The error was not in the line where the error occurred, but in the syntax of another BitPat in the same class.


In other words, variable 'a' in the line where the error occurs is defined in SomeClass, the syntax of 'a' is correct, but the syntax of variable b in the same SomeClass is incorrect.

When I fix this, the problem was resolved.

Recent Posts

See All

[Chisel] Don't use polymorphism

What I want to do There are multiple similar units Most of processes are the same, only some differences. Select an appropriate unit...

Comments


Let's do our best with our partner:​ ChatReminder

iphone6.5p2.png

It is an application that achieves goals in a chat format with partners.

google-play-badge.png
Download_on_the_App_Store_Badge_JP_RGB_blk_100317.png

Let's do our best with our partner:​ ChatReminder

納品:iPhone6.5①.png

It is an application that achieves goals in a chat format with partners.

google-play-badge.png
Download_on_the_App_Store_Badge_JP_RGB_blk_100317.png

Theme diary: Decide the theme and record for each genre

It is a diary application that allows you to post and record with themes and sub-themes for each genre.

google-play-badge.png
Download_on_the_App_Store_Badge_JP_RGB_blk_100317.png
bottom of page