JavaScript: Make File not extend Locatable anymore.

Files have strange `:0:0:0:0` locations for... reasons. This makes the predicates inherited from `Locatable` meaningless. A particularly bad case is `getNumLines()`, which will always return one. The right predicate to use is, of course, `getNumberOfLines()`, which is defined in `File` itself.
This commit is contained in:
Max Schaefer
2019-11-22 11:57:06 +00:00
parent 46b6e6d722
commit 6fbaa7a5ea

View File

@@ -198,8 +198,8 @@ class Folder extends Container, @folder {
}
/** A file. */
class File extends Container, @file, Locatable {
override Location getLocation() { hasLocation(this, result) }
class File extends Container, @file {
Location getLocation() { hasLocation(this, result) }
override string getAbsolutePath() { files(this, result, _, _, _) }