apex-tmLanguage icon indicating copy to clipboard operation
apex-tmLanguage copied to clipboard

Use of ternary expression causes highlighting error

Open scottlee-elega opened this issue 4 years ago • 0 comments

Details

Using a ternary expression in the below specified context causes syntax highlighting to break, although this is valid syntax and does deploy / run correctly.

What editor are you seeing the problem in? (e.g. Atom, Visual Studio Code, etc.) Visual Studio Code

What version of the editor are you using? 1.52.1

What color theme are you using? Visual Studio 2019 Dark

Repro

Please provide a code example and (optionally) a screenshot demonstrating the problem.

public without sharing class ProjectIncludedInBidHandler
{
	public Boolean isDelete;
	public Boolean isInsert;

	public ProjectIncludedInBidHandler()
	{
		this.isDelete = Trigger.isDelete != null ? Trigger.isDelete : false;
		this.isInsert = Trigger.isInsert != null ? Trigger.isInsert : false;
	}

	public Set<Id> relatedOportunityIds
	{
		get 
		{
			if(relatedOportunityIds == null) 
				relatedOportunityIds = new Set<Id>();
			return relatedOportunityIds;
		}
		set;
	}
}

image

scottlee-elega avatar Jan 29 '21 18:01 scottlee-elega