title: 'Erlang 17.0: Supporting Deprecated Types Without Removing warnings_as_errors'
---
Erlang 17.0 [deprecated some pre-defined types](http://www.erlang.org/download/otp_src_17.0.readme) like `dict()` and `gb_tree()` in favor of `dict:dict()` and `gb_tree:tree()`. The workaround they suggest (`nowarn_deprecated_type`) works in 17.0, but would break once the deprecated types are removed.
Not using `nowarn_deprecated_type` means that you can't use `warnings_as_errors`, because it would make deprecation warnings an error.
A rather nice solution to this issue an option that [rebar](https://github.com/rebar/rebar) takes: `platform_define`.
>It is also possible to specify platform specific options by specifying a pair or a triplet where the first string is a regex that is checked against the string