diff options
author | Martin Odersky <odersky@gmail.com> | 2015-08-24 13:12:02 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-08-24 13:12:02 +0200 |
commit | 739f8ea2c3b39f81f54bfea4b618770d7aa1a1c6 (patch) | |
tree | 926b1416edd0be6ffbbb14260259f6d1fe9fe1a9 /tests | |
parent | e850a99f16004a702b5fa63736ac215fc388051b (diff) | |
download | dotty-739f8ea2c3b39f81f54bfea4b618770d7aa1a1c6.tar.gz dotty-739f8ea2c3b39f81f54bfea4b618770d7aa1a1c6.tar.bz2 dotty-739f8ea2c3b39f81f54bfea4b618770d7aa1a1c6.zip |
Make it a syntactic criterion whether a literal is a legal type
Introduce a new non-terminal "SimpleLiteral". Only SimpleLiterals can be
types.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/neg/singletons.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/neg/singletons.scala b/tests/neg/singletons.scala index e4c6db060..5dff13096 100644 --- a/tests/neg/singletons.scala +++ b/tests/neg/singletons.scala @@ -6,4 +6,6 @@ object Test { val n: null = null // error: Null is not a legal singleton type val sym: 'sym = 'sym // error: Symbol is a legal singleton type + + val foo: s"abc" = "abc" // error: not a legal singleton type } |