JSPPE5025: Type `...' cannot be used here

Description

We provided a type (such as int or a user-defined type, e.g. created with class) where a type is syntactically not allowed.

Causes

Forgetting 'new'

Example:

1
auto pageController = Controllers.PageController();

In the above code, we forgot to instantiate the class Controllers.PageController (a class is a "type") using the new keyword. In order to fix this, we just add new before Controllers.PageController.

Fix:

1
auto pageController = new Controllers.PageController();

See Also

Share

HTML | BBCode | Direct Link