Closed
Description
I am not completely sure about this, but it was strange to get a compiler error when trying to do:
const re: Regex = regex!("42");
The error message is (copied from the plapen):
<anon>:8:19: 8:32 error: constants cannot refer to other statics, insert an intermediate constant instead
<anon>:8 const re: Regex = regex!("42");
^~~~~~~~~~~~~
<anon>:1:1: 12:1 note: in expansion of regex!
<anon>:8:19: 8:32 note: expansion site
error: aborting due to previous error
Shouldn't this work?
Metadata
Metadata
Assignees
Labels
No labels