Commit c77b7670 authored by Rufflewind's avatar Rufflewind Committed by Ben Gamari
Browse files

unlit: replace the SHEBANG with an empty line

This corrects the line numbers for literate code after a shebang.
Fixes #13414.

Test Plan: validate

Reviewers: austin, bgamari, trofi

Reviewed By: bgamari, trofi

Subscribers: trofi, rwbarton, thomie

Differential Revision:
parent ae0ccf8c
#!/usr/bin/env runhaskell
> module T13414 where
> main = invalid_ident_
T13414.lhs:3:10: error: Variable not in scope: invalid_ident_
......@@ -97,3 +97,4 @@ test('T12051', normal, compile_fail, [''])
test('T12429', normal, compile_fail, [''])
test('T12811', normal, compile_fail, [''])
test('T13260', normal, compile_fail, [''])
test('T13414', literate, compile_fail, [''])
......@@ -296,6 +296,9 @@ static void unlit(char *file, FILE *istream, FILE *ostream)
if (this == SHEBANG) {
myputc('\n', ostream);
} while(this!=ENDFILE);
if (defnsread==0)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment