Clojure-Intro-Course / clojure-intro-class

NOTE: This repository is obsolete. Was: A pilot project to use Clojure for introductory computer science courses at the University of Minnesota - Morris
20 stars 3 forks source link

Code causes regex parsing to break #83

Open HFellows opened 8 years ago

HFellows commented 8 years ago

I was testing some code using the may2015 file, and found that the following code, without the ns declaration and with the bottom line uncommented, throws an exception that can cause prettify-exception to fail and throw

itself:class clojure.lang.Compiler$CompilerException, cause: class java.lang.StackOverflowErroritself:class clojure.lang.Compiler$CompilerException, cause: class  java.lang.StackOverflowErrorException in thread "main" java.lang.ClassCastException:  java.lang.String cannot be cast to java.util.regex.Pattern, compiling:(/tmp/form-init9167229874779423206.clj:1:73)

(irrelevant lines trimmed.)

Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.regex.Pattern

at clojure.core$re_matcher.invoke(core.clj:4641)

at clojure.core$re_matches.invoke(core.clj:4685)

at errors.prettify_exception$first_match$fn__8339.invoke(prettify_exception.clj:24)

at errors.prettify_exception$first_match.invoke(prettify_exception.clj:24)

at errors.prettify_exception$prettify_exception.invoke(prettify_exception.clj:242)

at intro.core$_main.doInvoke(core.clj:117)