Language: C++

import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

int readint() { return readln.chomp.to!int; }
int[] readints() { return readln.split.to!(int[]); }

long calc(long x, long y) {
    if (x % y == 0) return -1;
    return x * 2;
}

void main() {
    auto xy = readints;
    int x = xy[0], y = xy[1];
    writeln(calc(x, y));
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import std.algorithm;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import std.array;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import std.conv;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import std.math;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import std.range;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import std.stdio;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import std.string;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
    8 | import std.typecons;
      | ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc: In function 'int readint()':
a.cc:10:24: error: 'readln' was not declared in this scope; did you mean 'readint'?
   10 | int readint() { return readln.chomp.to!int; }
      |                        ^~~~~~
      |                        readint
a.cc:10:39: error: expected ';' before '!' token
   10 | int readint() { return readln.chomp.to!int; }
      |                                       ^
      |                                       ;
a.cc:10:40: error: expected primary-expression before 'int'
   10 | int readint() { return readln.chomp.to!int; }
      |                                        ^~~
a.cc: At global scope:
a.cc:11:4: error: structured binding declaration cannot have type 'int'
   11 | int[] readints() { return readln.split.to!(int[]); }
      |    ^~
a.cc:11:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:11:4: error: empty structured binding declaration
a.cc:11:7: error: expected initializer before 'readints'
   11 | int[] readints() { return readln.split.to!(int[]); }
      |       ^~~~~~~~
a.cc:18:1: error: '::main' must return 'int'
   18 | void main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:19:15: error: 'readints' was not declared in this scope; did you mean 'readint'?
   19 |     auto xy = readints;
      |               ^~~~~~~~
      |               readint
a.cc:21:21: error: 'y' was not declared in this scope
   21 |     writeln(calc(x, y));
      |                     ^
a.cc:21:5: error: 'writeln' was not declared in this scope
   21 |     writeln(calc(x, y));
      |     ^~~~~~~