Ki-shell and if
See original GitHub issueHi,
OS windows10 x64 I trie this script :
var a = 18
var b = 19
var c = if (a>17) b else a
println(c)
and I runned it using kotlinc -script if_test1.kts result is 19
I tried this and just after typing b (vithout enter) I have got this error :
ki-shell 0.4.5/1.6.10
type :h for help
[0] var a = 18
[1] var b = 19
[2] var c = if (a>17) b
java.lang.NullPointerException
at org.jetbrains.kotlinx.ki.shell.parser.KotlinParserListenerForHighlighting.exitIfExpression(KotlinParserListenerForHighlighting.kt:679)
at org.jetbrains.kotlinx.ki.shell.parser.KotlinParser$IfExpressionContext.exitRule(KotlinParser.java:13491)
at org.antlr.v4.runtime.Parser.triggerExitRuleEvent(Parser.java:408)
at org.antlr.v4.runtime.Parser.exitRule(Parser.java:642)
at org.jetbrains.kotlinx.ki.shell.parser.KotlinParser.script(KotlinParser.java:514)
at org.jetbrains.kotlinx.ki.shell.plugins.KotlinHighlighter.buildHighlighting(KotlinHighlighter.kt:39)
at org.jetbrains.kotlinx.ki.shell.plugins.KotlinHighlighter.highlight(KotlinHighlighter.kt:20)
at org.jetbrains.kotlinx.ki.shell.plugins.BaseHighlighter$DefaultImpls.highlight$default(BaseHighlighter.kt:8)
at org.jetbrains.kotlinx.ki.shell.plugins.BaseHighlighter$DefaultImpls.highlight(BaseHighlighter.kt:11)
at org.jetbrains.kotlinx.ki.shell.plugins.KotlinHighlighter.highlight(KotlinHighlighter.kt:13)
at org.jetbrains.kotlinx.ki.shell.ContextHighlighter.highlight(ContextHighlighter.kt:16)
at org.jline.reader.impl.LineReaderImpl.getHighlightedBuffer(LineReaderImpl.java:4041)
at org.jline.reader.impl.LineReaderImpl.getDisplayedBufferWithPrompts(LineReaderImpl.java:3980)
at org.jline.reader.impl.LineReaderImpl.redisplay(LineReaderImpl.java:3848)
at org.jline.reader.impl.LineReaderImpl.redisplay(LineReaderImpl.java:3784)
at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:708)
at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:468)
at org.jetbrains.kotlinx.ki.shell.Shell.doRun(Shell.kt:205)
at org.jetbrains.kotlinx.ki.shell.KotlinShell.main(KotlinShell.kt:52)
[2]
What’s wrong here?
Issue Analytics
- State:
- Created a year ago
- Comments:12
Top Results From Across the Web
Ki-shell and if - Support - Kotlin Discussions
Hi,. I trie this script : var a = 18 var b = 19 var c = if (a>17) b else a println(c)....
Read more >The Kishell - David Weekley Homes
Vibrant space and limitless potential make the open floor plan a decorator's dream. The gourmet kitchen includes a breakfast island, oversized pantry, and ......
Read more >Kishel's Scents & Lures | Best Trapping Accessories
Kishel's Scents & Lure has got the best trapping accessories. At Kishel's, quality with respect for Nature is our way of life. With...
Read more >Jason Kishell at Houston Community College (all campuses)
Fantastic professor, very respectful when it comes to your work and always willing to help no matter what. You do have to take...
Read more >CHRISTEN KISHEL PHD - Home
As a psychologist I have extensive experience delivering evaluation and treatment services as well as consultation and supervision of others in the field....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s a known issue on 0.5.0, please try 0.5.1
ср, 29 июн. 2022 г., 19:58 Laurent Berger @.***>:
Yes, it required Java 11. Do you have an option to use it?
вт, 28 июн. 2022 г., 22:46 Laurent Berger @.***>: