Skip to content

java.lang.ClassCastException: java.util.regex.Matcher$ImmutableMatchResult cannot be cast to java.util.regex.Matcher #165

@talios

Description

@talios

I'm experimenting with using the bazel.io build tool from Google to build a simple Frege app ([https://github.com/talios/fregebzl](repo is here), and I'm getting the following out of the compiler:

Exception in thread "main" java.lang.ClassCastException: java.util.regex.Matcher$ImmutableMatchResult cannot be cast to java.util.regex.Matcher
  at frege.runtime.Regex.clone(Regex.java:55)
  at frege.runtime.Regex.find(Regex.java:99)
  at frege.java.util.Regex._tilde(Regex.java:1111)
  at frege.compiler.common.CompilerOptions.scanOpts(CompilerOptions.java:929)
  at frege.compiler.common.CompilerOptions$37.eval(CompilerOptions.java:2279)
  at frege.compiler.common.CompilerOptions$37.eval(CompilerOptions.java:2277)
  at frege.runtime.Delayed.call(Delayed.java:198)
  at frege.runtime.Delayed.forced(Delayed.java:267)
  at frege.compiler.Main$43.eval(Main.java:7142)
  at frege.runtime.Fun1$1.eval(Fun1.java:63)
  at frege.runtime.Delayed.call(Delayed.java:198)
  at frege.runtime.Runtime.runMain(Runtime.java:273)
  at frege.compiler.Main.main(Main.java:8211)

This is when running:

  rm -rf bazel-out/local_darwin-fastbuild/bin/src/main/libfrege_test-impl.jar.build_output
  mkdir -p bazel-out/local_darwin-fastbuild/bin/src/main/libfrege_test-impl.jar.build_output
  java -Xss2m -jar external/frege-lib/jar/frege3.22.525-g704b834.jar -v -hints \
    -d bazel-out/local_darwin-fastbuild/bin/src/main/libfrege_test-impl.jar.build_output \
    src/main/frege/test.fr

from the build.

I suspect from the trace this is something tripping when parsing the command line arguments, when I run those commands manually in my terminal the build seems to execute fine.

This is using frege3.22.525-g704b834.jar.

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