comparison src/testdir/test_vim9_class.vim @ 31501:560ba934725f v9.0.1083

patch 9.0.1083: empty and comment lines in a class cause an error Commit: https://github.com/vim/vim/commit/418b54788106efd94bbc71a4b100afae1080cbfc Author: Bram Moolenaar <Bram@vim.org> Date: Tue Dec 20 13:38:22 2022 +0000 patch 9.0.1083: empty and comment lines in a class cause an error Problem: Empty and comment lines in a class cause an error. Solution: Skip empty and comment lines. (closes https://github.com/vim/vim/issues/11734)
author Bram Moolenaar <Bram@vim.org>
date Tue, 20 Dec 2022 14:45:05 +0100
parents 1bebc2093e6b
children cd5247f4da06
comparison
equal deleted inserted replaced
31500:c78d697d032d 31501:560ba934725f
129 129
130 class TextPosition 130 class TextPosition
131 this.lnum: number 131 this.lnum: number
132 this.col: number 132 this.col: number
133 133
134 # make a nicely formatted string
134 def ToString(): string 135 def ToString(): string
135 return $'({this.lnum}, {this.col})' 136 return $'({this.lnum}, {this.col})'
136 enddef 137 enddef
137 endclass 138 endclass
138 139
153 154
154 class TextPosition 155 class TextPosition
155 this.lnum: number = 1 156 this.lnum: number = 1
156 this.col: number = 1 157 this.col: number = 1
157 158
159 # constructor with only the line number
158 def new(lnum: number) 160 def new(lnum: number)
159 this.lnum = lnum 161 this.lnum = lnum
160 enddef 162 enddef
161 endclass 163 endclass
162 164