nope, the only instance of restricting normally valid kotlin code is the DslMarker-annotation that disallows invocation of methods from an "outer scope", see
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-dsl-marker/ for a better explanation. But it does a very specific thing and is not applicapble to restrict imports or other language features except one.