dlang-community / drepl

A REPL for D
Boost Software License 1.0
78 stars 20 forks source link

std.array.Appender.clear @disable #30

Closed John-Colvin closed 10 years ago

John-Colvin commented 10 years ago

In drepl.interpreter you have calls like _incomplete.clear()

What is actually happening here (in released dmd) is that you are calling object.clear() by UFCS, as there is no Appender.clear for non-mutable element types. In dmd git HEAD we now have https://github.com/D-Programming-Language/phobos/commit/65baedc7b1d753e1b1a5b60443b5ecae5700e04e which means it is an error:

src/dawg/drepl/interpreter.d(33): Error: function std.array.Appender!(const(char)[], const(char)).Appender.clear is not callable because it is annotated with @disable
src/dawg/drepl/interpreter.d(55): Error: function std.array.Appender!(const(char)[], const(char)).Appender.clear is not callable because it is annotated with @disable
src/dawg/drepl/interpreter.d(58): Error: function std.array.Appender!(const(char)[], const(char)).Appender.clear is not callable because it is annotated with @disable