Raw strings: """ .. """ fixed

This commit is contained in:
Andrey Breslav
2011-11-30 10:20:19 +03:00
parent e9a9562efa
commit 90c4b0e746
3 changed files with 20 additions and 1 deletions
@@ -250,7 +250,8 @@ public class CompileTimeConstantResolver {
if (error != null) {
return error;
}
return new StringValue(unescapedText);
return new StringValue(unescapedText.substring(3, unescapedText.length() - 3));
}
@NotNull
+6
View File
@@ -0,0 +1,6 @@
fun box() : String {
val s = """ foo \n bar """
if (s != " foo \\n bar ") return "Fail: '$s'"
return "OK"
}
@@ -0,0 +1,12 @@
package org.jetbrains.jet.codegen;
/**
* @author yole
* @author alex.tkachman
*/
public class StringsTest extends CodegenTestCase {
public void testRawStrings() throws Exception {
blackBoxFile("rawStrings.jet");
}
}