Skip to content
Snippets Groups Projects
Commit 5af815f2 authored by KevinBuhr's avatar KevinBuhr Committed by Marge Bot
Browse files

Add test for old issue w/ bad source locations for warnings in .lhs files (#515)

parent 03f5adcd
No related branches found
No related tags found
No related merge requests found
In #515, an LHS file gave warnings attributed to the wrong source location
(i.e., line 1). This regression tests makes sure they are attributed to
the correct line.
> module Test where
> a = 1
> b = 2
The above should attribute the warnings to lines 6 and 7.
T515.lhs:6:3: warning: [-Wmissing-signatures (in -Wall)]
Top-level binding with no type signature: a :: Integer
T515.lhs:6:7: warning: [-Wtype-defaults (in -Wall)]
Defaulting the following constraint to type ‘Integer’
Num p0 arising from the literal ‘1’
In the expression: 1
In an equation for ‘a’: a = 1
T515.lhs:7:3: warning: [-Wmissing-signatures (in -Wall)]
Top-level binding with no type signature: b :: Integer
T515.lhs:7:7: warning: [-Wtype-defaults (in -Wall)]
Defaulting the following constraint to type ‘Integer’
Num p0 arising from the literal ‘2’
In the expression: 2
In an equation for ‘b’: b = 2
......@@ -144,3 +144,4 @@ test('T15781', normal, compile, [''])
test('T16339', normal, compile, [''])
test('T16619', requires_th, multimod_compile, ['T16619', '-v0'])
test('T504', normal, compile, [''])
test('T515', literate, compile, ['-Wall'])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment