Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 77335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:48:51+00:00 2026-05-10T20:48:51+00:00

While playing around with regexps in Scala I wrote something like this: scala> val

  • 0

While playing around with regexps in Scala I wrote something like this:

scala> val y = 'Foo' y: java.lang.String = Foo  scala> y 'Bar'  scala> 

As you can see, the second statement is just silently accepted. Is this legal a legal statement, and if so, what does it do? Or is it a bug in the parser and there should be an error message?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:48:52+00:00Added an answer on May 10, 2026 at 8:48 pm

    This is indeed an error in the parser. It is fixed in scala 2.7.2 (which is RC6 at the moment)

    $ ./scala Welcome to Scala version 2.7.2.RC6 (Java HotSpot(TM) Client VM, Java 1.5.0_16). Type in expressions to have them evaluated. Type :help for more information. scala> def y = 'foo' y: java.lang.String  scala> y 'bar' <console>:1: error: ';' expected but string literal found.        y 'bar'          ^  scala> val x = 'foo' x: java.lang.String = foo  scala> x 'foo' <console>:1: error: ';' expected but string literal found.        x 'foo'          ^  scala> 'foo' 'bar' <console>:1: error: ';' expected but string literal found.        'foo' 'bar'              ^ 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I ran across something I find curious while playing around with the Haskell interactive
I am playing around with Twisted and while trying to rewrite an old java
I've been playing around with it for a while and I like it very
So, I was playing around with Python while answering this question , and I
There is an eval() function in Python I stumbled upon while playing around. I
I was playing around with the following code: function recaller(){ while(x-- > 0)recaller(); }
I have been playing around with the Silverlight progressbar a while and no matter
A while back I was playing with methods using variable-length argument lists (java) that
While playing around with playframework yabe-siena-gae, I noticed a datastore file created for the
While playing around with the emulator, I noticed that when trying to view a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.