Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4BL3cEPHQTk2McE7C
16 lines
532 B
Bash
Executable File
16 lines
532 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Compiles each deliberately broken source and captures the compiler's own message.
|
|
cd "$(dirname "$0")/.."
|
|
OUT=$(mktemp -d)
|
|
capture() { # <source file name> <output name>
|
|
{
|
|
echo "\$ javac src/broken/$1"
|
|
javac -d "$OUT" "src/broken/$1" 2>&1 | grep -v '^Picked up JAVA_TOOL_OPTIONS' || true
|
|
} > "output/$2.txt"
|
|
cat "output/$2.txt"
|
|
}
|
|
capture FinalFieldClone.java 02-final-field-clone
|
|
capture ForgotToOverride.java 16-forgot-override
|
|
capture WithExpression.java 17-with-expression
|
|
rm -rf "$OUT"
|