dmd/compiler/test/fail_compilation/dip22a.d
Nick Treleaven 56b14c11ff
Show type location for 'no property' error (#15586)
* Show type location for 'no property' error

* Remove local path from test output
2023-09-08 16:44:42 +03:00

23 lines
817 B
D

/*
EXTRA_FILES: imports/dip22a.d
TEST_OUTPUT:
---
fail_compilation/dip22a.d(18): Error: no property `bar` for `new Klass` of type `imports.dip22a.Klass`
fail_compilation/imports/dip22a.d(3): class `Klass` defined here
fail_compilation/dip22a.d(19): Error: no property `bar` for `Struct()` of type `imports.dip22a.Struct`
fail_compilation/imports/dip22a.d(8): struct `Struct` defined here
fail_compilation/dip22a.d(20): Error: undefined identifier `bar` in module `imports.dip22a`
fail_compilation/dip22a.d(21): Error: no property `bar` for `Template!int` of type `void`
fail_compilation/dip22a.d(22): Error: no property `bar` for `12` of type `int`
---
*/
import imports.dip22a;
void test()
{
new Klass().bar();
Struct().bar();
imports.dip22a.bar();
Template!int.bar();
12.bar();
}