Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Free Pascal
»
General
(Moderators:
FPK
,
Tomas Hajny
) »
Is this an issue? Generic method + {$M+}
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
Register global hotkey
by
LemonParty
[
Today
at 09:05:25 pm]
Anyone interested in help...
by
Roland57
[
Today
at 08:42:50 pm]
FPC v3.2.2 internal error
by
Martin_fr
[
Today
at 08:28:16 pm]
Distance of gridlines in ...
by
wp
[
Today
at 08:08:14 pm]
How detect a keypress in ...
by
ad1mt
[
Today
at 07:44:10 pm]
Convert table to JSON arr...
by
LemonParty
[
Today
at 06:55:55 pm]
CustomDraw package compil...
by
wp
[
Today
at 06:54:28 pm]
Drawing a picture on the ...
by
wp
[
Today
at 06:34:20 pm]
Lazarus portable?
by
PascalDragon
[
Today
at 06:29:28 pm]
FPC 3.2.4-rc1 available
by
PascalDragon
[
Today
at 06:26:08 pm]
Initialize list in functi...
by
PascalDragon
[
Today
at 06:24:02 pm]
[SOLVED]FPHTTPServer with...
by
m.abudrais
[
Today
at 06:18:26 pm]
How to implement uKey-bas...
by
PascalDragon
[
Today
at 06:15:20 pm]
Parsing command line stri...
by
LemonParty
[
Today
at 01:21:47 pm]
synedit
by
scasparz
[
Today
at 10:05:25 am]
Get Out of Squircle Jail ...
by
Hansaplast
[
Today
at 09:36:22 am]
Paradox date filter
by
bytebites
[
Today
at 08:25:44 am]
head hurting - DBGrid Wor...
by
robertom
[
Today
at 01:52:08 am]
TScrollBox ScrollBy Metho...
by
andrew Bubble
[November 07, 2025, 11:54:17 pm]
OPCB – Object Pascal Comp...
by
fabianoallex
[November 07, 2025, 06:51:39 pm]
Blog area?
by
TBMan
[November 07, 2025, 03:57:17 pm]
MOSAIC - free terrain mak...
by
Tomi
[November 07, 2025, 02:09:39 pm]
TLazSerial : serial port ...
by
CM630
[November 07, 2025, 01:45:15 pm]
paszlib. Determine if ext...
by
Thaddy
[November 07, 2025, 01:35:11 pm]
How to turn OFF Word Wrap...
by
Thaddy
[November 07, 2025, 01:03:43 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Is this an issue? Generic method + {$M+} (Read 499 times)
ALLIGATOR
Sr. Member
Posts: 285
I use FPC [main] 💪🐯💪
Is this an issue? Generic method + {$M+}
«
on:
September 15, 2025, 10:19:14 am »
Code: Pascal
[Select]
[+]
[-]
program
app
;
{$ifdef FPC}{$mode delphi}{$endif}
type
{$M+}
TC
=
class
published
procedure
test<T>
;
end
;
{$M-}
procedure
TC
.
test
<T>
;
begin
WriteLn
(
'kek!'
)
;
end
;
begin
end
.
Output:
Code:
[Select]
Error: Undefined symbol: P$APP$_$TC_$__$$_TEST$1 (first seen in app.o)
D12.1CE - OK (apparently, the D12.1CE compiler is generally poor at discarding unused methods (whether this is good or bad)
Logged
I may seem rude - please don't take it personally
Leledumbo
Hero Member
Posts: 8831
Programming + Glam Metal + Tae Kwon Do = Me
Re: Is this an issue? Generic method + {$M+}
«
Reply #1 on:
September 16, 2025, 08:36:08 pm »
I'd say yes, report it. At least that shouldn't be a link time error, maybe a compile time error.
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)
PascalDragon
Hero Member
Posts: 6189
Compiler Developer
Re: Is this an issue? Generic method + {$M+}
«
Reply #2 on:
September 16, 2025, 10:28:13 pm »
Please report.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Free Pascal
»
General
(Moderators:
FPK
,
Tomas Hajny
) »
Is this an issue? Generic method + {$M+}
TinyPortal
© 2005-2018