summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/spell9644.d
blob: 383ec6775863b00bceac6ec7b67c8bd87f3a7ef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// REQUIRED_ARGS: -o-
// PERMUTE_ARGS:

/*
TEST_OUTPUT:
---
fail_compilation/spell9644.d(27): Error: undefined identifier `b`
fail_compilation/spell9644.d(28): Error: undefined identifier `xx`
fail_compilation/spell9644.d(29): Error: undefined identifier `cb`, did you mean variable `ab`?
fail_compilation/spell9644.d(30): Error: undefined identifier `bc`, did you mean variable `abc`?
fail_compilation/spell9644.d(31): Error: undefined identifier `ccc`
fail_compilation/spell9644.d(33): Error: undefined identifier `cor2`, did you mean variable `cor1`?
fail_compilation/spell9644.d(34): Error: undefined identifier `pua`, did you mean variable `pub`?
fail_compilation/spell9644.d(35): Error: undefined identifier `priw`
---
*/

import imports.spell9644a;

int a;
int ab;
int abc;
int cor1;

int main()
{
    cast(void)b; // max distance 0, no match
    cast(void)xx; // max distance 1, no match
    cast(void)cb; // max distance 1, match
    cast(void)bc; // max distance 1, match
    cast(void)ccc; // max distance 2, match

    cast(void)cor2; // max distance 1, match "cor1", but not cora from import (bug 13736)
    cast(void)pua;  // max distance 1, match "pub" from import
    cast(void)priw; // max distance 1, match "priv" from import, but do not report (bug 5839)
}