Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
[SOLVED] generics with constraints not working
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Getting results from sql ...
by
CraigC
[
Today
at 12:17:04 am]
CONCAT formula
by
wp
[
Today
at 12:03:36 am]
Hello! Anything new?
by
Curt Carpenter
[March 15, 2026, 11:53:40 pm]
Is it me or is there some...
by
mossbruc
[March 15, 2026, 11:41:22 pm]
[SOLVED] GTK3 : Icons hav...
by
Schmitty2005
[March 15, 2026, 08:43:28 pm]
emuloader: help to resurr...
by
arcadegamer
[March 15, 2026, 08:30:31 pm]
mORMot again (HttpServer/...
by
BSaidus
[March 15, 2026, 07:53:24 pm]
AutoSize TMemo.Height?
by
wp
[March 15, 2026, 05:55:05 pm]
Initialization & finaliza...
by
Martin_fr
[March 15, 2026, 05:24:36 pm]
could Ardour's YTK be use...
by
robert rozee
[March 15, 2026, 05:11:59 pm]
Possible Enhancement to t...
by
jamie
[March 15, 2026, 04:10:38 pm]
lazarus 4.99 and missing ...
by
wp
[March 15, 2026, 03:11:43 pm]
Debian releases a Gtk3 La...
by
paweld
[March 15, 2026, 12:45:32 pm]
Questions about TFuncSeri...
by
hedgehog
[March 15, 2026, 06:58:29 am]
Problem with drawing orde...
by
wp
[March 15, 2026, 12:57:00 am]
CryptoLib4Pascal
by
Xor-el
[March 14, 2026, 06:17:32 pm]
Extended Module Player
by
Gigatron
[March 14, 2026, 05:32:06 pm]
[AGGPas] Difference betwe...
by
Roland57
[March 14, 2026, 04:36:02 pm]
declaring Array
by
Thaddy
[March 14, 2026, 01:24:11 pm]
TChart: Wrong default val...
by
wp
[March 14, 2026, 11:30:54 am]
Text Fill (Memo)
by
paweld
[March 14, 2026, 09:09:13 am]
Qt6/Wayland clipboard: pa...
by
AlexTP
[March 14, 2026, 08:56:58 am]
Pocketbase
by
PierceNg
[March 14, 2026, 06:29:04 am]
ADUG Symposium 2026
by
Mathias Burbach
[March 14, 2026, 04:45:57 am]
Any way to "embed" Window...
by
jamie
[March 14, 2026, 12:55:37 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] generics with constraints not working (Read 3162 times)
blochee
New Member
Posts: 16
[SOLVED] generics with constraints not working
«
on:
May 04, 2014, 03:06:00 am »
Hello fellow programmers.
I've have another "simplette" (a simple problem).
The following does not work:
Code:
[Select]
type
generic TExample10<T1: class; T2> = class
end;
begin
end.
The error given:
testing_ground.lpr(2,26) Fatal: Syntax error, ">" expected but ":" found
This example was taken straight from the net at the following site:
http://free-pascal-general.1045716.n5.nabble.com/Feature-announcement-Generic-type-constraints-td5712290.html
Now, that example was posted in Dec, 2012 and I just upgraded to fpc 2.6.4.
Anybody know how to solve the problem?
«
Last Edit: May 04, 2014, 09:08:59 pm by blochee
»
Logged
Lazarus Version #: 1.2.4
FPC Version: 2.6.4
SVN Revision: 45510
x86_64-linux-gtk 2
Ubuntu 14.04 LTS
Leledumbo
Hero Member
Posts: 8835
Programming + Glam Metal + Tae Kwon Do = Me
Re: generics with constraints not working
«
Reply #1 on:
May 04, 2014, 05:44:38 am »
Most (if not all) of generics features and bug fixes are only available in trunk. 2.6.X will never get generics patches backported, the changes are too radical.
Logged
Follow this if you want me to answer:
http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F
http://pascalgeek.blogspot.com
https://bitbucket.org/leledumbo
https://github.com/leledumbo
Code first, think later - Natural programmer B)
blochee
New Member
Posts: 16
Re: generics with constraints not working
«
Reply #2 on:
May 04, 2014, 09:08:18 pm »
Thanks! I got the latest trunk and it works. If anybody else is reading this and is having the same problems, you can find how to install the trunk at:
http://wiki.lazarus.freepascal.org/Getting_Lazarus#Getting_SVN
Logged
Lazarus Version #: 1.2.4
FPC Version: 2.6.4
SVN Revision: 45510
x86_64-linux-gtk 2
Ubuntu 14.04 LTS
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
[SOLVED] generics with constraints not working
TinyPortal
© 2005-2018