1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: change .ReturnType and .Type to .return_type and .typ (#6494)

This commit is contained in:
Daniel Däschle
2020-09-28 06:13:38 +02:00
committed by GitHub
parent 71e1ca72ec
commit 06cade6c31
8 changed files with 29 additions and 29 deletions

View File

@ -6,23 +6,23 @@ fn (mut app App) method_three(s string) string { return s }
fn main() {
$for method in App.methods {
$if method.Type is fn(string) string {
$if method.typ is fn(string) string {
println('$method.name IS `fn(string) string`')
} $else {
println('$method.name is NOT `fn(string) string`')
}
$if method.ReturnType !is int {
$if method.return_type !is int {
println('$method.name does NOT return `int`')
} $else {
println('$method.name DOES return `int`')
}
$if method.args[0].Type !is string {
$if method.args[0].typ !is string {
println("${method.name}'s first arg is NOT `string`")
} $else {
println("${method.name}'s first arg IS `string`")
}
// TODO: Double inversion, should this even be allowed?
$if method.Type is fn() {
$if method.typ is fn() {
println('$method.name IS a void method')
} $else {
println('$method.name is NOT a void method')