Join Slack
Powered by
is there anyway i can disable/suppress this warnin...
# intellij
t
theapache64
08/31/2025, 1:59 PM
is there anyway i can disable/suppress this warning? 🤔 note: i’ve the highlighted classes in classpath, so the test am using this fragment works fine
a
Adam S
08/31/2025, 3:52 PM
it doesn't look like there's a direct suppression
https://youtrack.jetbrains.com/issue/KTIJ-32613/Language-Injection-Imports-show-Package-directive-and-imports-are-forbidden-in-code-fragments-in-injected-files
Adam S
08/31/2025, 4:46 PM
as a workaround, move the imports to a separate string. Weirdly imports after
$imports
aren't reported as errors 🤔
t
theapache64
09/01/2025, 6:57 AM
that’s interesting.. 🤔 thanks
theapache64
09/01/2025, 7:16 AM
just tried this.. and it looks like its working.. and the separate string has to be multiline string. single line strings are detected 😄
Open in Slack
Previous
Next