Raw strings: """ .. """ fixed
This commit is contained in:
+2
-1
@@ -250,7 +250,8 @@ public class CompileTimeConstantResolver {
|
|||||||
if (error != null) {
|
if (error != null) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
return new StringValue(unescapedText);
|
|
||||||
|
return new StringValue(unescapedText.substring(3, unescapedText.length() - 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
@@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user