Skip to content

Any word inside a class, struct or enum without the keyword func is considered as FunctionDecl #2109

@HassanTaleb90

Description

@HassanTaleb90

Why when we type any word inside a class, struct or enum without the keyword func is considered as FunctionDecl?

///Bug
class MyClass {
  word1 //FunctionDecl
}

enum MyEnum {
  word2 //FunctionDecl
}

struct MyStruct {
  word3 //FunctionDecl
}

///Normal:
class MyClass {
  func word1 //FunctionDecl
}

enum MyEnum {
  func word2 //FunctionDecl
}

struct MyStruct {
  func word3 //FunctionDecl
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions